コード例 #1
0
 public function testCanCreateServiceWithName()
 {
     $this->initServiceManager();
     $this->assertTrue($this->mailOptionsFactory->canCreateServiceWithName($this->serviceLocator, 'acmailer.mailoptions.default', ''));
     $this->assertFalse($this->mailOptionsFactory->canCreateServiceWithName($this->serviceLocator, 'acmailer.mailoptions.employees', ''));
     $this->assertFalse($this->mailOptionsFactory->canCreateServiceWithName($this->serviceLocator, 'foo', ''));
     $this->assertFalse($this->mailOptionsFactory->canCreateServiceWithName($this->serviceLocator, 'invalid.mailoptions.foobar', ''));
     $this->assertFalse($this->mailOptionsFactory->canCreateServiceWithName(new ServiceManagerMock(['Config' => []]), 'acmailer.mailoptions.default', ''));
 }