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


PHP TestCase::getTestFullName方法代码示例

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


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

示例1: 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

示例2: 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

示例3: saveFailed

 public function saveFailed(PrintResultEvent $e)
 {
     $file = $this->getLogDir() . $this->config['file'];
     $result = $e->getResult();
     if ($result->wasSuccessful()) {
         if (is_file($file)) {
             unlink($file);
         }
         return;
     }
     $output = [];
     foreach ($result->failures() as $fail) {
         $output[] = $this->localizePath(TestCase::getTestFullName($fail->failedTest()));
     }
     foreach ($result->errors() as $fail) {
         $output[] = $this->localizePath(TestCase::getTestFullName($fail->failedTest()));
     }
     file_put_contents($file, implode("\n", $output));
 }
开发者ID:namnv609,项目名称:Codeception,代码行数:19,代码来源:RunFailed.php

示例4: run

 public function run()
 {
     if (!class_exists('\\Codeception\\Lib\\TestLoader')) {
         throw new TaskException($this, "This task requires Codeception to be loaded. Please require autoload.php of Codeception");
     }
     $testLoader = new \Codeception\Lib\TestLoader($this->testsFrom);
     $testLoader->loadTests();
     $tests = $testLoader->getTests();
     $i = 0;
     $groups = [];
     $this->printTaskInfo("Processing " . count($tests) . " files");
     // splitting tests by groups
     foreach ($tests as $test) {
         $groups[$i % $this->numGroups + 1][] = \Codeception\TestCase::getTestFullName($test);
         $i++;
     }
     // saving group files
     foreach ($groups as $i => $tests) {
         $filename = $this->saveTo . $i;
         $this->printTaskInfo("Writing {$filename}");
         file_put_contents($filename, implode("\n", $tests));
     }
 }
开发者ID:gdscei,项目名称:robo-paracept,代码行数:23,代码来源:SplitTestsByGroups.php

示例5: checkEnvironmentExists

 protected function checkEnvironmentExists(\Codeception\TestCase $test)
 {
     $envs = $test->getEnvironment();
     if (empty($envs)) {
         return;
     }
     if (!isset($this->settings['env'])) {
         Notification::warning("Environments are not configured", TestCase::getTestFullName($test));
         return;
     }
     $availableEnvironments = array_keys($this->settings['env']);
     $listedEnvironments = explode(',', implode(',', $test->getEnvironment()));
     foreach ($listedEnvironments as $env) {
         if (!in_array($env, $availableEnvironments)) {
             Notification::warning("Environment {$env} was not configured but used in test", TestCase::getTestFullName($test));
         }
     }
 }
开发者ID:hitechdk,项目名称:Codeception,代码行数:18,代码来源:SuiteManager.php


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