Skip to content

Instantly share code, notes, and snippets.

@achepukov
Created June 29, 2016 07:41
Show Gist options
  • Save achepukov/c25630573eb8adb7ca22915c73787ab4 to your computer and use it in GitHub Desktop.
Save achepukov/c25630573eb8adb7ca22915c73787ab4 to your computer and use it in GitHub Desktop.
Test generator - creates test when app failed with exception
<?php
require_once 'application.php';
require_once 'generator.php';
$app = new Application($_GET, $_POST);
$testGenerator = Generator::factory();
try {
$app->execute();
} catch(Exception $e) {
$testGenerator->createTest(serialize($app), $_GET, $_POST, $e));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment