PHP code example of vendi-advertising / vendi-sanity-tester

1. Go to this page and download the library: Download vendi-advertising/vendi-sanity-tester library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

vendi-advertising / vendi-sanity-tester example snippets




use Vendi\SanityTester\TestGroup;
use Vendi\SanityTester\TestRunner;
use Vendi\SanityTester\Tests\FileSystemTest;
use Vendi\SanityTester\Tests\PhpVersionTest;

define('VENDI_SANITY_ROOT', __DIR__ );

//The sanity checker is controlled via composer now
if(!file_exists(VENDI_SANITY_ROOT . '/vendor/autoload.php')){
    echo '<h1>Composer not loaded </h1>';
    exit;
}

//Load the plugin's autoloader
dd individual tests
                    ->with_test(new FileSystemTest('Lock',          VENDI_SANITY_ROOT . '/composer.lock'))
                    ->with_test(new FileSystemTest('Vendor folder', VENDI_SANITY_ROOT . '/vendor/composer/'))
            )
            ->with_test_group(
                (new TestGroup('PHP'))
                    ->with_test(new PhpVersionTest(7, [1,2,3]))
            )
;

$runner->run();

define( 'WP_USE_THEMES', false );