Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'PHPUnit/Framework.php';
- class CodeGenerationTest extends PHPUnit_Framework_TestCase
- {
- protected function setUp()
- {
- if (file_exists('a'))
- {
- unlink('a');
- }
- if (file_exists('b'))
- {
- unlink('b');
- }
- }
- private function subtest($name)
- {
- file_put_contents($name, $name);
- ob_start();
- include($name);
- $result = ob_get_clean();
- $this->assertEquals($name, $result, "Testing $name");
- usleep(400000);
- }
- public function test1()
- {
- $this->subtest('a');
- }
- public function test2()
- {
- $this->subtest('b');
- }
- public function test3()
- {
- $this->subtest('a');
- }
- public function test4()
- {
- $this->subtest('b');
- }
- }
Add Comment
Please, Sign In to add comment