Пример #1
0
 /**
  * Tests getting services
  *
  * @author Serghei Iakovlev <*****@*****.**>
  * @since  2016-01-29
  */
 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);
     });
 }
Пример #2
0
 public static function __set_state(array $attributes)
 {
     return parent::__set_state($attributes);
 }