/** * */ public function tearDown() { Runkit::resetConstant('TRANSFORMIST_ROOT'); }
/** * */ public function testTypeWithoutFileInfo() { Runkit::requiredBy($this); Runkit::reimplementFunction('class_exists', '$className', 'return false;'); $FileInfo = new Transformist_FileInfo(vfsStream::url('root/accessible/empty')); $caught = false; try { $FileInfo->type(); } catch (Transformist_Exception $e) { $caught = true; } $this->assertTrue($caught); Runkit::resetFunction('class_exists'); }
/** * */ public function tearDown() { Runkit::resetFunction('exec'); }
/** * */ public static function requiredBy(PHPUnit_Framework_TestCase $Case) { if (!Runkit::isEnabled()) { $Case->markTestSkipped('Runkit must be enabled'); } }