@@ -16,6 +16,13 @@ class SuiteGenerationTest extends TestCase
1616 const RESOURCES_DIR = TESTS_BP . DIRECTORY_SEPARATOR . 'verification ' . DIRECTORY_SEPARATOR . 'Resources ' ;
1717 const CONFIG_YML_FILE = FW_BP . DIRECTORY_SEPARATOR . SuiteGenerator::YAML_CODECEPTION_CONFIG_FILENAME ;
1818
19+ const MANIFEST_RESULTS = [
20+ 'SampleSuite3Cest.php:IncludeTest ' ,
21+ 'SampleSuite5Cest.php:additionalTest ' ,
22+ 'SampleSuiteCest.php:IncludeTest ' ,
23+ 'SampleSuite4Cest.php:IncludeTest '
24+ ];
25+
1926 private static $ YML_EXISTS_FLAG = false ;
2027 private static $ TEST_GROUPS = [];
2128
@@ -45,18 +52,34 @@ public function testSuiteGeneration1()
4552 $ yml = Yaml::parse (file_get_contents (self ::CONFIG_YML_FILE ));
4653 $ this ->assertArrayHasKey ($ groupName , $ yml ['groups ' ]);
4754
48- // Validate test manifest contents
49- $ actualManifest = TESTS_BP .
55+ $ suiteResultBaseDir = TESTS_BP .
5056 DIRECTORY_SEPARATOR .
5157 "verification " .
5258 DIRECTORY_SEPARATOR .
5359 "_generated " .
5460 DIRECTORY_SEPARATOR .
5561 $ groupName .
56- DIRECTORY_SEPARATOR .
57- TestManifest::TEST_MANIFEST_FILENAME ;
58- $ expectedManifest = self ::RESOURCES_DIR . DIRECTORY_SEPARATOR . "TestSuiteGeneration1.txt " ;
59- $ this ->assertFileEquals ($ expectedManifest , $ actualManifest , '' , true , true );
62+ DIRECTORY_SEPARATOR ;
63+
64+ // Validate test manifest contents
65+ $ actualManifest = $ suiteResultBaseDir . TestManifest::TEST_MANIFEST_FILENAME ;
66+ $ actualTestReferences = explode (PHP_EOL , file_get_contents ($ actualManifest ));
67+
68+ for ($ i = 0 ; $ i < count ($ actualTestReferences ); $ i ++) {
69+ if (empty ($ actualTestReferences [$ i ])) {
70+ continue ;
71+ }
72+
73+ $ this ->assertStringEndsWith (self ::MANIFEST_RESULTS [$ i ], $ actualTestReferences [$ i ]);
74+ $ this ->assertNotFalse (strpos ($ actualTestReferences [$ i ], $ groupName ));
75+ }
76+
77+ // Validate expected php files exist
78+ foreach (self ::MANIFEST_RESULTS as $ expectedTestReference ) {
79+ $ cestName = explode (": " , $ expectedTestReference , 2 );
80+ $ this ->assertFileExists ($ suiteResultBaseDir . $ cestName [0 ]);
81+ }
82+
6083 }
6184
6285 public static function tearDownAfterClass ()
0 commit comments