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);
        });
    }