Repository navigation
Expand file tree
/
Copy pathTestCase.php
More file actions
43 lines (36 loc) · 1.38 KB
/
Copy pathTestCase.php
File metadata and controls
43 lines (36 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
namespace Codeception;
use Codeception\Event\StepEvent;
use Codeception\Exception\ConditionalAssertionFailed;
use Codeception\TestCase\Shared\Dependencies;
use Codeception\TestCase\Test;
use Symfony\Component\EventDispatcher\Event;
abstract class TestCase extends \PHPUnit_Framework_TestCase implements \PHPUnit_Framework_SelfDescribing
{
protected $backupGlobalsBlacklist = array('app');
/**
* scenario stores steps and test settings: groups, environment, etc
*/
abstract public function getScenario();
public static function getTestSignature(\PHPUnit_Framework_TestCase $testCase)
{
if ($testCase instanceof TestCase\Interfaces\Descriptive) {
return $testCase->getSignature();
}
return get_class($testCase).'::'.$testCase->getName(false);
}
public static function getTestFileName(\PHPUnit_Framework_TestCase $testCase)
{
if ($testCase instanceof TestCase\Interfaces\Descriptive) {
return $testCase->getFileName();
}
return (new \ReflectionClass($testCase))->getFileName();
}
public static function getTestFullName(\PHPUnit_Framework_TestCase $testCase)
{
if ($testCase instanceof TestCase\Interfaces\Plain) {
return self::getTestFileName($testCase);
}
return self::getTestFileName($testCase).':'.$testCase->getName(false);
}
}