11
11
class TestManifest
12
12
{
13
13
const SINGLE_RUN_CONFIG = 'singleRun ' ;
14
- const DEFAULT_BROWSER = 'chrome ' ;
15
14
const TEST_MANIFEST_FILENAME = 'testManifest.txt ' ;
16
15
17
16
/**
@@ -21,13 +20,6 @@ class TestManifest
21
20
*/
22
21
private $ filePath ;
23
22
24
- /**
25
- * Test Manifest environment flag. This is added to each dir or file in order for tests to execute properly.
26
- *
27
- * @var string $environment
28
- */
29
- private $ environment = self ::DEFAULT_BROWSER ;
30
-
31
23
/**
32
24
* Type of manifest to generate. (Currently describes whether to path to a dir or for each test).
33
25
*
@@ -47,9 +39,8 @@ class TestManifest
47
39
*
48
40
* @param string $path
49
41
* @param string $runConfig
50
- * @param string $env
51
42
*/
52
- public function __construct ($ path , $ runConfig, $ env )
43
+ public function __construct ($ path , $ runConfig )
53
44
{
54
45
$ this ->relativeDirPath = substr ($ path , strlen (dirname (dirname (TESTS_BP ))) + 1 );
55
46
$ filePath = $ path . DIRECTORY_SEPARATOR . self ::TEST_MANIFEST_FILENAME ;
@@ -58,10 +49,6 @@ public function __construct($path, $runConfig, $env)
58
49
fclose ($ fileResource );
59
50
60
51
$ this ->runTypeConfig = $ runConfig ;
61
-
62
- if ($ env ) {
63
- $ this ->environment = $ env ;
64
- }
65
52
}
66
53
67
54
/**
@@ -87,7 +74,7 @@ public function recordCest($cestName, $tests)
87
74
88
75
foreach ($ tests as $ test ) {
89
76
$ line = $ this ->relativeDirPath . DIRECTORY_SEPARATOR . $ cestName . '.php: ' . $ test ->getName ();
90
- fwrite ($ fileResource , $ this -> appendDefaultBrowser ( $ line) . "\n" );
77
+ fwrite ($ fileResource , $ line . PHP_EOL );
91
78
}
92
79
93
80
fclose ($ fileResource );
@@ -102,21 +89,8 @@ public function recordCest($cestName, $tests)
102
89
public function recordPathToExportDir ()
103
90
{
104
91
$ fileResource = fopen ($ this ->filePath , 'a ' );
105
-
106
92
$ line = $ this ->relativeDirPath . DIRECTORY_SEPARATOR ;
107
- fwrite ($ fileResource , $ this ->appendDefaultBrowser ($ line ) ."\n" );
108
-
93
+ fwrite ($ fileResource , $ line . PHP_EOL );
109
94
fclose ($ fileResource );
110
95
}
111
-
112
- /**
113
- * Function which appends the --env flag to the test. This is needed to properly execute all tests in codeception.
114
- *
115
- * @param string $line
116
- * @return string
117
- */
118
- private function appendDefaultBrowser ($ line )
119
- {
120
- return "$ {line} --env " . $ this ->environment ;
121
- }
122
96
}
0 commit comments