當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。