当前位置: 首页>>代码示例>>PHP>>正文


PHP Configuration::logDir方法代码示例

本文整理汇总了PHP中Codeception\Configuration::logDir方法的典型用法代码示例。如果您正苦于以下问题:PHP Configuration::logDir方法的具体用法?PHP Configuration::logDir怎么用?PHP Configuration::logDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Codeception\Configuration的用法示例。


在下文中一共展示了Configuration::logDir方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $this->config = Configuration::config();
     $this->log_dir = Configuration::logDir();
     // prepare log dir
     parent::__construct();
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:7,代码来源:Runner.php

示例2: _failed

 public function _failed(\Codeception\TestCase $test, $fail)
 {
     if (!$this->client || !$this->client->getInternalResponse()) {
         return;
     }
     file_put_contents(\Codeception\Configuration::logDir() . basename($test->getFileName()) . '.page.debug.html', $this->client->getInternalResponse()->getContent());
 }
开发者ID:lenninsanchez,项目名称:donadores,代码行数:7,代码来源:Framework.php

示例3: execute

 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $conf = $this->getGlobalConfig($input->getOption('config'));
     $output->writeln("<info>Cleaning up " . Configuration::logDir() . "...</info>");
     FileSystem::doEmptyDir(Configuration::logDir());
     $output->writeln("Done");
 }
开发者ID:lenninsanchez,项目名称:donadores,代码行数:7,代码来源:Clean.php

示例4: __construct

 public function __construct()
 {
     $this->config = Configuration::config();
     $this->log_dir = Configuration::logDir();
     // prepare log dir
     $this->phpUnitOverriders();
     parent::__construct();
 }
开发者ID:lenninsanchez,项目名称:donadores,代码行数:8,代码来源:Runner.php

示例5: __construct

 public function __construct($max_files = 3)
 {
     $this->path = \Codeception\Configuration::logDir();
     $this->max_files = $max_files;
     // internal log
     $logHandler = new \Monolog\Handler\RotatingFileHandler($this->path . 'codeception.log', $this->max_files);
     $this->logger = new \Monolog\Logger('Codeception');
     $this->logger->pushHandler($logHandler);
 }
开发者ID:lenninsanchez,项目名称:donadores,代码行数:9,代码来源:Logger.php

示例6: generateFilename

 public function generateFilename(CodeGuy $I)
 {
     $I->haveFakeClass($stub = Stub::make($this->class, array('test' => Stub::makeEmpty('\\Codeception\\TestCase\\Cept', array('getFileName' => function () {
         return 'testtest';
     })))));
     $I->executeTestedMethod($stub);
     $I->seeResultEquals(\Codeception\Configuration::logDir() . 'debug' . DIRECTORY_SEPARATOR . 'testtest - 1');
     $I->executeTestedMethod($stub, 'mytest');
     $I->seeResultEquals(\Codeception\Configuration::logDir() . 'debug' . DIRECTORY_SEPARATOR . 'testtest - 2 - mytest');
 }
开发者ID:pfz,项目名称:codeception,代码行数:10,代码来源:WebDebugCest.php

示例7: __construct

 /**
  * Class constructor.
  *
  * @param array              $config
  * @param array              $options
  * @param PhireMockProcess   $process  optional PhiremockProcess object
  */
 public function __construct(array $config, array $options, PhiremockProcess $process = null)
 {
     $this->config['bin_path'] = Config::projectDir() . '../vendor/bin/phiremock';
     $this->config['logs_path'] = Config::logDir();
     parent::__construct($config, $options);
     $this->initProcess($process);
     list($ip, $port) = explode(':', $this->config['listen']);
     $this->process->start($ip, $port, $this->config['bin_path'], $this->config['logs_path'], $this->config['debug']);
     if ($this->config['startDelay']) {
         sleep($this->config['startDelay']);
     }
 }
开发者ID:mcustiel,项目名称:phiremock-codeception-extension,代码行数:19,代码来源:Phiremock.php

示例8: _initialize

 public function _initialize()
 {
     $this->debug('Initializing PuffinReport');
     if (array_key_exists('logFile', $this->config)) {
         $this->logFile = $this->config['logFile'];
     } else {
         $this->logFile = Configuration::logDir() . 'vcresult.html';
     }
     if (array_key_exists('templateVars', $this->config)) {
         $this->templateVars = $this->config['templateVars'];
     }
     if (array_key_exists('templateFile', $this->config)) {
         $this->templateFile = $this->config['templateFile'];
     } else {
         $this->templateFile = __DIR__ . '/report/template.php';
     }
 }
开发者ID:nubium,项目名称:puffin,代码行数:17,代码来源:PuffinReporter.php

示例9: init

 private function init()
 {
     $this->debug("Initializing VisualCeptionReport");
     if (array_key_exists('logFile', $this->config)) {
         $this->logFile = $this->config["logFile"];
     } else {
         $this->logFile = \Codeception\Configuration::logDir() . 'vcresult.html';
     }
     if (array_key_exists('templateVars', $this->config)) {
         $this->templateVars = $this->config["templateVars"];
     }
     if (array_key_exists('templateFile', $this->config)) {
         $this->templateFile = $this->config["templateFile"];
     } else {
         $this->templateFile = __DIR__ . "/report/template.php";
     }
 }
开发者ID:vergissberlin,项目名称:codeception-module-visualception,代码行数:17,代码来源:VisualCeptionReporter.php

示例10: startServer

 private function startServer()
 {
     if ($this->resource !== null) {
         return;
     }
     $command = $this->getCommand();
     $descriptorSpec = [['pipe', 'r'], ['file', Configuration::logDir() . 'phpbuiltinserver.output.txt', 'w'], ['file', Configuration::logDir() . 'phpbuiltinserver.errors.txt', 'a']];
     $this->resource = proc_open($command, $descriptorSpec, $this->pipes, null, null, ['bypass_shell' => true]);
     if (!is_resource($this->resource)) {
         throw new ExtensionException($this, 'Failed to start server.');
     }
     if (!proc_get_status($this->resource)['running']) {
         proc_close($this->resource);
         throw new ExtensionException($this, 'Failed to start server.');
     }
     if ($this->config['startDelay'] > 0) {
         sleep($this->config['startDelay']);
     }
 }
开发者ID:airdrummingfool,项目名称:PhpBuiltinServer,代码行数:19,代码来源:PhpBuiltinServer.php

示例11: startServer

 private function startServer()
 {
     if ($this->resource !== null) {
         return;
     }
     $command = $this->getCommand();
     $descriptorSpec = [['pipe', 'r'], ['file', Configuration::logDir() . 'phpbuiltinserver.output.txt', 'w'], ['file', Configuration::logDir() . 'phpbuiltinserver.errors.txt', 'a']];
     $this->resource = proc_open($command, $descriptorSpec, $this->pipes, null, null, ['bypass_shell' => true]);
     if (!is_resource($this->resource)) {
         throw new ExtensionException($this, 'Failed to start server.');
     }
     if (!proc_get_status($this->resource)['running']) {
         proc_close($this->resource);
         throw new ExtensionException($this, 'Failed to start server.');
     }
     $max_checks = 10;
     $checks = 0;
     $this->write("Waiting for the PHP server to be reachable");
     while (true) {
         if ($checks >= $max_checks) {
             throw new ExtensionException($this, 'PHP server never became reachable');
             break;
         }
         if ($fp = @fsockopen($this->config['hostname'], $this->config['port'], $errCode, $errStr, 10)) {
             $this->writeln('');
             $this->writeln("PHP server is now reachable");
             fclose($fp);
             break;
         }
         $this->write('.');
         $checks++;
         // Wait before checking again
         sleep(1);
     }
     // Clear progress line writing
     $this->writeln('');
 }
开发者ID:Archanium,项目名称:PhpBuiltinServer,代码行数:37,代码来源:PhpBuiltinServer.php

示例12: __construct

 /**
  * Class constructor.
  */
 public function __construct()
 {
     $this->defaults['logs-path'] = Config::logDir();
 }
开发者ID:mcustiel,项目名称:codeception-wiremock-extension,代码行数:7,代码来源:WireMockArguments.php

示例13: makeScreenshot

 /**
  * Makes a screenshot of current window and saves it to `tests/_log/debug`.
  *
  * ``` php
  * <?php
  * $I->amOnPage('/user/edit');
  * $I->makeScreenshot('edit page');
  * // saved to: tests/_log/debug/UserEdit - edit page.png
  * ?>
  * ```
  *
  * @param $name
  */
 public function makeScreenshot($name)
 {
     $debugDir = \Codeception\Configuration::logDir() . 'debug';
     if (!is_dir($debugDir)) {
         mkdir($debugDir, 0777);
     }
     $caseName = str_replace('Cept.php', '', $this->test->getFileName());
     $caseName = str_replace('Cept.php', '', $caseName);
     /**
      * This is used for Cept only
      *
      * To be consistent with Cest, no sub-dir would be created, '\' and '/' in $caseName would be replaced with '.'
      */
     $search = array('/', '\\');
     $replace = array('.', '.');
     $caseName = str_replace($search, $replace, $caseName);
     $screenName = $debugDir . DIRECTORY_SEPARATOR . $caseName . ' - ' . $name . '.png';
     $this->_saveScreenshot($screenName);
     $this->debug("Screenshot saved to {$screenName}");
 }
开发者ID:gargallo,项目名称:tfs-test,代码行数:33,代码来源:WebDriver.php

示例14: fopen

<?php

require_once __DIR__ . '/_data/MyOutputFormatter.php';
require_once __DIR__ . '/_data/MyGroupHighlighter.php';
@unlink(\Codeception\Configuration::logDir() . 'order.txt');
$fh = fopen(\Codeception\Configuration::logDir() . 'order.txt', 'a');
fwrite($fh, 'B');
开发者ID:lenninsanchez,项目名称:donadores,代码行数:7,代码来源:_bootstrap.php

示例15: _failed

 public function _failed(\Codeception\TestCase $test, $fail)
 {
     $output = \Codeception\Configuration::logDir() . DIRECTORY_SEPARATOR . basename($test->getFileName()) . '.page.debug.html';
     file_put_contents($output, $this->browser->getResponse()->getContent());
 }
开发者ID:NaszvadiG,项目名称:ImageCMS,代码行数:5,代码来源:Symfony1.php


注:本文中的Codeception\Configuration::logDir方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。