コード例 #1
0
 /**
  * @test
  */
 public function createService()
 {
     $toggleManager = $this->getMockBuilder('Qandidate\\Toggle\\ToggleManager')->disableOriginalConstructor();
     $this->services->setService('ToggleManagerFactory', $toggleManager->getMock());
     $context = $this->getMockBuilder('Qandidate\\Toggle\\Context');
     $this->services->setService('ToggleFeature\\UserContextFactory', $context->getMock());
     $this->assertInstanceOf('Qandidate\\Toggle\\Context', $this->factory->createService($this->services));
 }
コード例 #2
0
 /**
  * @test
  */
 public function createService()
 {
     $toggleManager = $this->getMockBuilder('Zend\\Authentication\\AuthenticationServiceInterface')->disableOriginalConstructor();
     $this->services->setService('FeatureToggle\\Storage', $toggleManager->getMock());
     $this->assertInstanceOf('Qandidate\\Toggle\\Context', $this->factory->createService($this->services));
 }