本文整理汇总了PHP中Codeception\Configuration::outputDir方法的典型用法代码示例。如果您正苦于以下问题:PHP Configuration::outputDir方法的具体用法?PHP Configuration::outputDir怎么用?PHP Configuration::outputDir使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Codeception\Configuration
的用法示例。
在下文中一共展示了Configuration::outputDir方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->getGlobalConfig($input->getOption('config'));
$output->writeln("<info>Cleaning up " . Configuration::outputDir() . "...</info>");
FileSystem::doEmptyDir(Configuration::outputDir());
$output->writeln("Done");
}
示例2: __construct
public function __construct($options)
{
$this->options = $options;
$this->logDir = Configuration::outputDir();
$this->settings = array_merge($this->settings, Configuration::config()['coverage']);
self::$coverage = new \PHP_CodeCoverage();
}
示例3: __construct
public function __construct()
{
$this->config = Configuration::config();
$this->logDir = Configuration::outputDir(); // prepare log dir
$this->phpUnitOverriders();
parent::__construct();
}
示例4: __construct
public function __construct($options)
{
$this->options = $options;
$this->logDir = Configuration::outputDir();
$this->settings = array_merge($this->settings, Configuration::config()['coverage']);
self::$coverage = new \PHP_CodeCoverage();
// Apply filter
$filter = new Filter(self::$coverage);
$filter->whiteList(Configuration::config())->blackList(Configuration::config());
}
示例5: setUp
protected function setUp()
{
if (!extension_loaded('xdebug')) {
$this->markTestSkipped('xdebug extension required for c3test.');
}
$this->c3 = Configuration::dataDir() . 'claypit/c3.php';
$this->c3_dir = Codeception\Configuration::outputDir() . 'c3tmp/';
@mkdir($this->c3_dir, 0777, true);
$_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE'] = 'test';
$_SERVER['HTTP_X_CODECEPTION_CODECOVERAGE_DEBUG'] = 'debug';
}
示例6: hasInstalledVimConfigurationInTargetDirectory
/**
* @test
*
* @throws \Codeception\Exception\ConfigurationException
*/
public function hasInstalledVimConfigurationInTargetDirectory()
{
$target = Configuration::outputDir() . 'vimConfigTest';
$this->cleanupFolder($target);
Debug::debug('<info>Preparing command...</info>');
$command = $this->getCommand();
Debug::debug('<info>Preparing question helper...</info>');
$this->mockQuestionHelper($command, function ($test, $order, ConfirmationQuestion $question) {
// Pick the first choice
if ($order == 0) {
return true;
}
throw new UnhandledQuestionException();
});
Debug::debug('<info>Executing...</info>');
$tester = new \Symfony\Component\Console\Tester\CommandTester($command);
$tester->execute([VimConfigurationInstallCommand::TARGET_DIR_ARGUMENT => $target]);
$output = $tester->getDisplay();
Debug::debug($output);
$finder = new Finder();
$count = $finder->directories()->ignoreDotFiles(false)->in($target)->count();
$this->assertNotEquals(0, $count, 'No files have been copied!');
}
示例7: hasCopiedFilesIntoTargetLocation
/**
* @test
*
* @covers ::execute
* @covers ::configure
* @covers ::findTemplates
* @covers ::getTemplatesList
* @covers ::formatTemplatesList
* @covers ::createTemplate
*/
public function hasCopiedFilesIntoTargetLocation()
{
$target = Configuration::outputDir() . 'tmp';
// Eventual pre-cleanup
$this->cleanupFolder($target);
Debug::debug('<info>Preparing command...</info>');
$command = $this->getCommand();
Debug::debug('<info>Preparing question helper...</info>');
$this->mockQuestionHelper($command, function ($test, $order, Question $question) {
// Pick the first choice
if ($order == 0) {
return true;
}
throw new UnhandledQuestionException();
});
Debug::debug('<info>Executing...</info>');
$tester = new \Symfony\Component\Console\Tester\CommandTester($command);
$tester->execute([TemplateCommand::ARGUMENT_PATH_NAME => $target]);
$output = $tester->getDisplay();
Debug::debug($output);
$finder = new Finder();
$count = $finder->directories()->in($target)->count();
$this->assertNotEquals(0, $count, 'No files have been copied!');
}
示例8: testInvalidCheckMethod
/**
* @covers ::check
* @expectedException InvalidArgumentException
*/
public function testInvalidCheckMethod()
{
$agent = new Agent(['cache_dir' => Configuration::outputDir(), 'lowercase' => true, 'browscap' => ['doAutoUpdate' => false]], 'Invalid');
$agent->check();
}
示例9: afterSuite
public function afterSuite(SuiteEvent $e)
{
if (!$this->isEnabled()) {
return;
}
if (!file_exists(Configuration::outputDir() . 'c3tmp/codecoverage.serialized')) {
if (file_exists(Configuration::outputDir() . 'c3tmp/error.txt')) {
throw new \RuntimeException(file_get_contents(Configuration::outputDir() . 'c3tmp/error.txt'));
}
return;
}
$contents = file_get_contents(Configuration::outputDir() . 'c3tmp/codecoverage.serialized');
$coverage = @unserialize($contents);
if ($coverage === false) {
return;
}
$this->mergeToPrint($coverage);
}
示例10: afterSuite
public function afterSuite(SuiteEvent $e)
{
if (!$this->isEnabled()) {
return;
}
$coverageFile = Configuration::outputDir() . 'c3tmp/codecoverage.serialized';
$retries = 5;
while (!file_exists($coverageFile) && --$retries >= 0) {
usleep(0.5 * 1000000);
// 0.5 sec
}
if (!file_exists($coverageFile)) {
if (file_exists(Configuration::outputDir() . 'c3tmp/error.txt')) {
throw new \RuntimeException(file_get_contents(Configuration::outputDir() . 'c3tmp/error.txt'));
}
return;
}
$contents = file_get_contents($coverageFile);
$coverage = @unserialize($contents);
if ($coverage === false) {
return;
}
$this->mergeToPrint($coverage);
}
示例11:
function __construct($options = [])
{
$this->options = $options;
$this->logDir = Configuration::outputDir();
}
示例12: getLogDir
public function getLogDir()
{
return Config::outputDir();
}
示例13: _failed
public function _failed(\Codeception\TestCase $test, $fail)
{
$output = \Codeception\Configuration::outputDir() . DIRECTORY_SEPARATOR . basename($test->getFileName()) . '.page.debug.html';
file_put_contents($output, $this->browser->getResponse()->getContent());
}
示例14: testBug2046
public function testBug2046()
{
$this->module->webDriver = null;
$this->module->_saveScreenshot(\Codeception\Configuration::outputDir() . 'testshot.png');
}
示例15: codecept_log_dir
/**
* Returns absolute path to the requested object which is expected to be in
* the log directory of a testing project.
*
* @since 1.0.1
*
* @param string $appendPath A relative path to the requested object.
* @return string The absolute path to the object.
*/
function codecept_log_dir($appendPath = '')
{
return \Codeception\Configuration::outputDir() . $appendPath;
}