@@ -24,7 +24,7 @@ public function tearDown()
2424
2525 public function testCorrectInitialisation ()
2626 {
27- $ parser = ServiceParser:: getInstance ('fakefile.php ' );
27+ $ parser = new ServiceParser ('fakefile.php ' );
2828
2929 $ this ->assertEquals ('fakefile.php ' , $ parser ->getServicesFile ());
3030 }
@@ -41,7 +41,7 @@ public function testLoadServicesFileIntoParser()
4141
4242 SingletonMock::inject ($ confStub , 'Flint\Config ' );
4343
44- $ parser = ServiceParser:: getInstance ('fakefile.php ' );
44+ $ parser = new ServiceParser ('fakefile.php ' );
4545 $ parser ->loadServices ();
4646
4747 $ this ->assertArrayHasKey ('hello ' , $ parser ->getServices ());
@@ -54,7 +54,7 @@ public function testLoadServicesFileIntoParser()
5454 */
5555 public function testInvalidServiceFileThrowsException ()
5656 {
57- $ parser = ServiceParser:: getInstance ('blah ' );
57+ $ parser = new ServiceParser ('blah ' );
5858 $ parser ->loadServices ();
5959 }
6060
@@ -72,7 +72,7 @@ public function testEmptyServiceParseCallThrowsException()
7272 ]
7373 ]);
7474
75- $ parser = ServiceParser:: getInstance ('fakefile.php ' );
75+ $ parser = new ServiceParser ('fakefile.php ' );
7676 $ parser ->parse ();
7777 }
7878
@@ -116,11 +116,10 @@ public function testServicesLoadedIntoAppCorrectly()
116116
117117 SingletonMock::inject ($ stub , 'Flint\ServiceParser ' );
118118
119- $ parser = ServiceParser::getInstance ();
120- $ parser ->loadServices ()
119+ $ stub ->loadServices ()
121120 ->setServices ($ serviceConfig );
122121
123- $ result = $ parser ->parse ();
122+ $ result = $ stub ->parse ();
124123
125124 $ this ->assertArrayHasKey ('Fake ' , $ result );
126125 $ this ->assertArrayHasKey ('Fake2 ' , $ result );
@@ -169,11 +168,10 @@ public function testSharedServiceWithArgLoadedCorrectly()
169168
170169 SingletonMock::inject ($ stub , 'Flint\ServiceParser ' );
171170
172- $ parser = ServiceParser::getInstance ();
173- $ parser ->loadServices ()
171+ $ stub ->loadServices ()
174172 ->setServices ($ serviceConfig );
175173
176- $ result = $ parser ->parse ();
174+ $ result = $ stub ->parse ();
177175 $ this ->assertArrayHasKey ('Fake ' , $ result );
178176 $ time = $ result ['Fake ' ]->getTime ();
179177 $ this ->assertEquals ('Josh ' , $ result ['Fake ' ]->getName ());
0 commit comments