PHP code example of stepapo / url-tester

1. Go to this page and download the library: Download stepapo/url-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/ */

    

stepapo / url-tester example snippets




$return = [];

foreach (Nette\Utils\Finder::findFiles(['*.yml', '*.neon'])->from(__DIR__ . '/config') as $file) {
    $config = match($ext = pathinfo($file->getFilename(), PATHINFO_EXTENSION)) {
        'neon' => (array) Neon::decode(FileSystem::read((string) $file)),
        'yml' => yaml_parse_file($file->getRealPath()),
        default => throw new InvalidArgumentException("File extension '$ext' is not supported."),
    };
    $return[$config['name']] = $config;
}

return $return;


$container = App\Bootstrap::bootForTests()->createContainer();

/**
 * @testCase
 * @dataProvider config.php
 */
class PresenterTest extends Stepapo\RequestTester\Tester\TestCase
{
}

$container->createInstance(PresenterTest::class, [Nette\Tester\Environment::loadData()])->run();



$runner->outputHandlers[] = new Stepapo\RequestTester\Tester\RequestOutputHandler(
    $runner,