public function testShouldRenderExceptionIfPluginThrowsExceptionWhenRunning() { TestPlugin::$throwException = true; touch(self::$tmpDir . '/src/PhpGuardTest/Namespace1/TestThrow.php'); $this->getTester()->run('all test'); $this->assertContains(TestPlugin::THROW_MESSAGE, $this->getDisplay()); }
public function testShouldCatchErrorWhenPluginThrowsAnError() { $this->getTester()->run('-vvv'); TestPlugin::$throwException = true; file_put_contents($file = getcwd() . '/tag1/test4.php', '<?php', LOCK_EX); $this->evaluate(); $this->assertDisplayContains(TestPlugin::THROW_MESSAGE); }