Phalcon\Test\Unit\DiTest::testGetServices PHP Метод

testGetServices() публичный Метод

Tests getting services
С версии: 2016-01-29
Автор: Serghei Iakovlev ([email protected])
public testGetServices ( )
    public function testGetServices()
    {
        $this->specify("Getting services does now work correctly", function () {
            $expectedServices = ['service1' => Service::__set_state(['_name' => 'service1', '_definition' => 'some-service', '_shared' => false, '_sharedInstance' => null]), 'service2' => Service::__set_state(['_name' => 'service2', '_definition' => 'some-other-service', '_shared' => false, '_sharedInstance' => null])];
            $this->phDi->set('service1', 'some-service');
            $this->phDi->set('service2', 'some-other-service');
            expect($this->phDi->getServices())->equals($expectedServices);
        });
    }