1111class TestManifest
1212{
1313 const SINGLE_RUN_CONFIG = 'singleRun ' ;
14- const DEFAULT_BROWSER = 'chrome ' ;
1514 const TEST_MANIFEST_FILENAME = 'testManifest.txt ' ;
1615
1716 /**
@@ -21,13 +20,6 @@ class TestManifest
2120 */
2221 private $ filePath ;
2322
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-
3123 /**
3224 * Type of manifest to generate. (Currently describes whether to path to a dir or for each test).
3325 *
@@ -47,9 +39,8 @@ class TestManifest
4739 *
4840 * @param string $path
4941 * @param string $runConfig
50- * @param string $env
5142 */
52- public function __construct ($ path , $ runConfig, $ env )
43+ public function __construct ($ path , $ runConfig )
5344 {
5445 $ this ->relativeDirPath = substr ($ path , strlen (dirname (dirname (TESTS_BP ))) + 1 );
5546 $ filePath = $ path . DIRECTORY_SEPARATOR . self ::TEST_MANIFEST_FILENAME ;
@@ -58,10 +49,6 @@ public function __construct($path, $runConfig, $env)
5849 fclose ($ fileResource );
5950
6051 $ this ->runTypeConfig = $ runConfig ;
61-
62- if ($ env ) {
63- $ this ->environment = $ env ;
64- }
6552 }
6653
6754 /**
@@ -87,7 +74,7 @@ public function recordCest($cestName, $tests)
8774
8875 foreach ($ tests as $ test ) {
8976 $ line = $ this ->relativeDirPath . DIRECTORY_SEPARATOR . $ cestName . '.php: ' . $ test ->getName ();
90- fwrite ($ fileResource , $ this -> appendDefaultBrowser ( $ line) . "\n" );
77+ fwrite ($ fileResource , $ line . PHP_EOL );
9178 }
9279
9380 fclose ($ fileResource );
@@ -102,21 +89,8 @@ public function recordCest($cestName, $tests)
10289 public function recordPathToExportDir ()
10390 {
10491 $ fileResource = fopen ($ this ->filePath , 'a ' );
105-
10692 $ line = $ this ->relativeDirPath . DIRECTORY_SEPARATOR ;
107- fwrite ($ fileResource , $ this ->appendDefaultBrowser ($ line ) ."\n" );
108-
93+ fwrite ($ fileResource , $ line . PHP_EOL );
10994 fclose ($ fileResource );
11095 }
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- }
12296}
0 commit comments