@@ -260,25 +260,6 @@ public function testGetAllTestObjectsWithInvalidExtends()
260260 $ toh ->getAllObjects ();
261261 }
262262
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-
282263 /**
283264 * Validate test object when ENABLE_PAUSE is set to true
284265 *
@@ -299,7 +280,7 @@ public function testGetTestObjectWhenEnablePause()
299280
300281 $ resolverMock = new MockModuleResolverBuilder ();
301282 $ resolverMock ->setup ();
302- $ this -> setMockParserOutput ($ mockData );
283+ ObjectHandlerUtil:: mockTestObjectHandlerWitData ($ mockData );
303284
304285 // run object handler method
305286 $ toh = TestObjectHandler::getInstance ();
@@ -325,7 +306,7 @@ public function testGetTestObjectWhenEnablePause()
325306 $ expectedFailedActionObject2 = new ActionObject (
326307 'pauseWhenFailed ' ,
327308 'pause ' ,
328- []
309+ [ActionObject:: PAUSE_ACTION_INTERNAL_ATTRIBUTE => true ]
329310 );
330311
331312 $ expectedBeforeHookObject = new TestHookObject (
0 commit comments