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


PHP TestCase::getTestSignature方法代码示例

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


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

示例1: _failed

 public function _failed(TestCase $test, $fail)
 {
     if (!$this->client || !$this->client->getInternalResponse()) {
         return;
     }
     $this->_savePageSource(codecept_output_dir() . str_replace(['::', '\\', '/'], ['.', '.', '.'], TestCase::getTestSignature($test)) . '.fail.html');
 }
开发者ID:vladislavl-hyuna,项目名称:crmapp,代码行数:7,代码来源:InnerBrowser.php

示例2: _failed

 public function _failed(TestCase $test, $fail)
 {
     if (!$this->client || !$this->client->getInternalResponse()) {
         return;
     }
     $filename = str_replace(['::', '\\', '/'], ['.', '', ''], TestCase::getTestSignature($test)) . '.fail.html';
     file_put_contents(codecept_output_dir($filename), $this->client->getInternalResponse()->getContent());
 }
开发者ID:Eli-TW,项目名称:Codeception,代码行数:8,代码来源:InnerBrowser.php

示例3: testCeptNamings

 /**
  * @group core
  */
 public function testCeptNamings()
 {
     $cept = new \Codeception\TestCase\Cept();
     $cept->configName('LoginCept.php')->config('testFile', 'tests/acceptance/LoginCept.php');
     $this->assertEquals('tests/acceptance/LoginCept.php', \Codeception\TestCase::getTestFileName($cept));
     $this->assertEquals('tests/acceptance/LoginCept.php', \Codeception\TestCase::getTestFullName($cept));
     $this->assertEquals('LoginCept', \Codeception\TestCase::getTestSignature($cept));
 }
开发者ID:hitechdk,项目名称:Codeception,代码行数:11,代码来源:CeptTest.php

示例4: testCestNamings

 /**
  * @group core
  */
 public function testCestNamings()
 {
     $cept = new \Codeception\TestCase\Cest();
     $klass = new stdClass();
     $cept->config('testClassInstance', $klass)->config('testMethod', 'user')->config('testFile', 'tests/acceptance/LoginCest.php');
     $this->assertEquals('tests/acceptance/LoginCest.php:user', \Codeception\TestCase::getTestFullName($cept));
     $this->assertEquals('tests/acceptance/LoginCest.php', \Codeception\TestCase::getTestFileName($cept));
     $this->assertEquals('stdClass::user', \Codeception\TestCase::getTestSignature($cept));
 }
开发者ID:hitechdk,项目名称:Codeception,代码行数:12,代码来源:CestTest.php

示例5: getTestNames

 protected function getTestNames($tests)
 {
     $testNames = [];
     foreach ($tests as $test) {
         if ($test instanceof \PHPUnit_Framework_TestCase) {
             $testNames[] = \Codeception\TestCase::getTestSignature($test);
         }
     }
     return $testNames;
 }
开发者ID:hitechdk,项目名称:Codeception,代码行数:10,代码来源:TestLoaderTest.php

示例6: assertContainsTestName

 protected function assertContainsTestName($name, $tests)
 {
     foreach ($tests as $test) {
         if ($test instanceof \PHPUnit_Framework_TestCase) {
             $testName = \Codeception\TestCase::getTestSignature($test);
             if ($testName == $name) {
                 return;
             }
             codecept_debug($testName);
         }
     }
     $this->fail("{$name} not found in tests");
 }
开发者ID:itillawarra,项目名称:cmfive,代码行数:13,代码来源:TestLoaderTest.php

示例7: _failed

 public function _failed(\Codeception\TestCase $test, $fail)
 {
     $filename = str_replace(['::', '\\', '/'], ['.', '', ''], \Codeception\TestCase::getTestSignature($test)) . '.fail.png';
     $this->_saveScreenshot(codecept_output_dir($filename));
     $this->debug("Screenshot was saved into '_output' dir");
 }
开发者ID:Eli-TW,项目名称:Codeception,代码行数:6,代码来源:WebDriver.php

示例8: persist

 public function persist(TestEvent $e)
 {
     if (!$this->webDriverModule or !$this->dir) {
         return;
     }
     $indicatorHtml = '';
     $slideHtml = '';
     foreach ($this->slides as $i => $step) {
         $indicatorHtml .= (new Template($this->indicatorTemplate))->place('step', (int) $i)->place('isActive', (int) $i ? '' : 'class="active"')->produce();
         $slideHtml .= (new Template($this->slidesTemplate))->place('image', $i)->place('caption', $step->getHumanizedArguments())->place('isActive', (int) $i ? '' : 'active')->place('isError', $step->hasFailed() ? 'error' : '')->produce();
     }
     $html = (new Template($this->template))->place('indicators', $indicatorHtml)->place('slides', $slideHtml)->place('feature', ucfirst($e->getTest()->getFeature()))->place('test', TestCase::getTestSignature($e->getTest()))->produce();
     $indexFile = $this->dir . DIRECTORY_SEPARATOR . 'index.html';
     file_put_contents($indexFile, $html);
     $testName = TestCase::getTestSignature($e->getTest()) . ' - ' . ucfirst($e->getTest()->getFeature());
     $this->recordedTests[$testName] = substr($indexFile, strlen(codecept_output_dir()));
 }
开发者ID:2pisoftware,项目名称:testrunner,代码行数:17,代码来源:ScreenCapture.php

示例9: _failed

 public function _failed(TestCase $test, $fail)
 {
     $this->debugWebDriverLogs();
     $filename = str_replace(['::', '\\', '/'], ['.', '', ''], TestCase::getTestSignature($test)) . '.fail';
     $this->_saveScreenshot(codecept_output_dir() . $filename . '.png');
     $this->_savePageSource(codecept_output_dir() . $filename . '.html');
     $this->debug("Screenshot and page source were saved into '_output' dir");
 }
开发者ID:nsgomez,项目名称:Codeception,代码行数:8,代码来源:WebDriver.php

示例10: persist

 public function persist(TestEvent $e)
 {
     if (!$this->webDriverModule or !$this->dir) {
         return;
     }
     $indicatorHtml = '';
     $slideHtml = '';
     foreach ($this->slides as $i => $step) {
         $indicatorHtml .= (new Template($this->indicatorTemplate))->place('step', (int) $i)->place('isActive', (int) $i ? '' : 'class="active"')->produce();
         $slideHtml .= (new Template($this->slidesTemplate))->place('image', $i)->place('caption', $step->getHtml('#3498db'))->place('isActive', (int) $i ? '' : 'active')->place('isError', $step->hasFailed() ? 'error' : '')->produce();
     }
     $html = (new Template($this->template))->place('indicators', $indicatorHtml)->place('slides', $slideHtml)->place('feature', ucfirst($e->getTest()->getFeature()))->place('test', TestCase::getTestSignature($e->getTest()))->produce();
     file_put_contents($this->dir . DIRECTORY_SEPARATOR . 'index.html', $html);
 }
开发者ID:corcre,项目名称:elabftw,代码行数:14,代码来源:Recorder.php

示例11: _failed

 public function _failed(\Codeception\TestCase $test, $fail)
 {
     $filename = str_replace(['::', '\\', '/'], ['.', '', ''], \Codeception\TestCase::getTestSignature($test)) . '.fail';
     $this->_saveScreenshot(codecept_output_dir() . $filename . '.png');
     file_put_contents(codecept_output_dir() . $filename . '.html', $this->webDriver->getPageSource());
     $this->debug("Screenshot and HTML snapshot were saved into '_output' dir");
 }
开发者ID:kansey,项目名称:yii2albom,代码行数:7,代码来源:WebDriver.php


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