function it_should_process_global_section(ContainerInterface $container, PhpGuard $guard) { $guard->setOptions(array('ignores' => 'app/cache'))->shouldBeCalled(); $text = <<<EOF phpguard: ignores: app/cache EOF; $this->compile($text); }
private function configureErrorHandler() { $file = PhpGuard::getPluginCache('phpunit') . '/error.log'; if (is_file($file)) { @unlink($file); } touch($file); $this->errorFile = $file; ini_set('display_errors', 1); ini_set('error_log', $file); register_shutdown_function(array($this, 'handleShutdown')); }
private function configureErrorHandler() { $errorFile = PhpGuard::getPluginCache('phpspec') . '/error.log'; // @codeCoverageIgnoreStart if (file_exists($errorFile)) { unlink($errorFile); } // @codeCoverageIgnoreEnd touch($errorFile); ini_set('display_errors', 1); ini_set('error_log', $errorFile); $this->errorFile = $errorFile; register_shutdown_function(array($this, 'handleShutdown')); }
public function generateRerunFile() { $dir = PhpGuard::getPluginCache('behat'); $rerunFile = $dir . '/rerun.dat'; // clean up unexisting result $this->cleanup(); $rerun = array(); foreach ($this->results as $result) { if (!in_array($file = $result->getFile(), $rerun)) { $rerun[] = $file; } } $content = implode("\n", $rerun); $this->fs->putFileContents($rerunFile, $content); return $rerunFile; }
public static function getCacheFileName() { $dir = PhpGuard::getPluginCache('phpspec'); return $dir . DIRECTORY_SEPARATOR . 'results.dat'; }
public static function getRerunFileName() { $dir = PhpGuard::getPluginCache('behat'); $file = $dir . DIRECTORY_SEPARATOR . 'rerun.dat'; return $file; }
protected function setUp() { parent::setUp(); $file = PhpGuard::getPluginCache('phpunit') . '/result_test.dat'; static::$container->setParameter('phpunit.inspector_cache', $file); }
public static function getCacheFile() { $dir = PhpGuard::getCacheDir(); if (!is_dir($dir)) { mkdir($dir, 0775, true); } return $dir . '/coverage_session.dat'; }
public function testGetPlugincache() { $cacheDir = PhpGuard::getCacheDir(); PhpGuard::getPluginCache('foo'); $this->assertTrue(is_dir($cacheDir . '/plugins/foo')); }
public function setupContainer(ContainerInterface $container) { $container->set('ui.application', $this); $container->setShared('ui.shell', function ($c) { $shell = new Shell($c); return $shell; }); $phpGuard = new PhpGuard(); $phpGuard->setContainer($container); $phpGuard->setupServices($container); $phpGuard->setupCommands($container); $phpGuard->setupListeners($container); $container->set('phpguard', $phpGuard); $this->setDispatcher($container->get('dispatcher')); $this->container = $container; }
public static function getResultFileName() { $dir = PhpGuard::getPluginCache('phpunit'); return $dir . '/results.dat'; }