@@ -145,7 +145,7 @@ public function testGenerateEmptySuite()
145
145
$ mockSuiteGenerator ->generateSuite ("basicTestSuite " );
146
146
}
147
147
148
- public function testInvalidTestRef ()
148
+ public function testInvalidSuiteTestPair ()
149
149
{
150
150
// Mock Suite1 => Test1 and Suite2 => Test2
151
151
$ suiteDataArrayBuilder = new SuiteDataArrayBuilder ();
@@ -188,6 +188,30 @@ public function testInvalidTestRef()
188
188
$ mockSuiteGenerator ->generateAllSuites ($ manifest );
189
189
}
190
190
191
+ public function testNonExistentSuiteTestPair ()
192
+ {
193
+ $ testDataArrayBuilder = new TestDataArrayBuilder ();
194
+ $ mockSimpleTest = $ testDataArrayBuilder
195
+ ->withName ('Test1 ' )
196
+ ->withAnnotations (['group ' => [['value ' => 'group1 ' ]]])
197
+ ->withTestActions ()
198
+ ->build ();
199
+ $ mockTestData = ['tests ' => array_merge ($ mockSimpleTest )];
200
+ $ this ->setMockTestAndSuiteParserOutput ($ mockTestData , []);
201
+
202
+ // Make invalid manifest
203
+ $ suiteConfig = ['Suite3 ' => ['Test1 ' ]];
204
+ $ manifest = TestManifestFactory::makeManifest ('default ' , $ suiteConfig );
205
+
206
+ // Set up Expected Exception
207
+ $ this ->expectException (TestReferenceException::class);
208
+ $ this ->expectExceptionMessageRegExp ('#Suite3 is not defined# ' );
209
+
210
+ // parse and generate suite object with mocked data and manifest
211
+ $ mockSuiteGenerator = SuiteGenerator::getInstance ();
212
+ $ mockSuiteGenerator ->generateAllSuites ($ manifest );
213
+ }
214
+
191
215
/**
192
216
* Function used to set mock for parser return and force init method to run between tests.
193
217
*
0 commit comments