Пример #1
0
 public function testLoadServicesFileIntoParser()
 {
     /**
      * Mock out the Config loader
      */
     $confStub = $this->getMockBuilder('Flint\\Config')->getMock();
     $confStub->expects($this->any())->method('load')->will($this->returnValue($this->fakeConfig1));
     SingletonMock::inject($confStub, 'Flint\\Config');
     $parser = new ServiceParser('fakefile.php');
     $parser->loadServices();
     $this->assertArrayHasKey('hello', $parser->getServices());
     SingletonMock::cleanUp('Flint\\Config');
 }