@@ -260,25 +260,6 @@ public function testGetAllTestObjectsWithInvalidExtends()
260
260
$ toh ->getAllObjects ();
261
261
}
262
262
263
- /**
264
- * Function used to set mock for parser return and force init method to run between tests.
265
- *
266
- * @param array $data
267
- * @throws \Exception
268
- */
269
- private function setMockParserOutput ($ data )
270
- {
271
- // clear test object handler value to inject parsed content
272
- $ property = new \ReflectionProperty (TestObjectHandler::class, 'testObjectHandler ' );
273
- $ property ->setAccessible (true );
274
- $ property ->setValue (null );
275
-
276
- $ mockDataParser = AspectMock::double (TestDataParser::class, ['readTestData ' => $ data ])->make ();
277
- $ instance = AspectMock::double (ObjectManager::class, ['create ' => $ mockDataParser ])
278
- ->make (); // bypass the private constructor
279
- AspectMock::double (ObjectManagerFactory::class, ['getObjectManager ' => $ instance ]);
280
- }
281
-
282
263
/**
283
264
* Validate test object when ENABLE_PAUSE is set to true
284
265
*
@@ -299,7 +280,7 @@ public function testGetTestObjectWhenEnablePause()
299
280
300
281
$ resolverMock = new MockModuleResolverBuilder ();
301
282
$ resolverMock ->setup ();
302
- $ this -> setMockParserOutput ($ mockData );
283
+ ObjectHandlerUtil:: mockTestObjectHandlerWitData ($ mockData );
303
284
304
285
// run object handler method
305
286
$ toh = TestObjectHandler::getInstance ();
@@ -325,7 +306,7 @@ public function testGetTestObjectWhenEnablePause()
325
306
$ expectedFailedActionObject2 = new ActionObject (
326
307
'pauseWhenFailed ' ,
327
308
'pause ' ,
328
- []
309
+ [ActionObject:: PAUSE_ACTION_INTERNAL_ATTRIBUTE => true ]
329
310
);
330
311
331
312
$ expectedBeforeHookObject = new TestHookObject (
0 commit comments