/** * */ public function tearDown() { Runkit::resetFunction('exec'); }
/** * */ 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'); }