AcMailerTest\Options\MailOptionsAbstractFactoryTest::testCanCreateServiceWithName PHP Method

testCanCreateServiceWithName() public method

    public function testCanCreateServiceWithName()
    {
        $this->initServiceManager();
        $this->assertTrue($this->mailOptionsFactory->canCreate($this->serviceLocator, 'acmailer.mailoptions.default'));
        $this->assertFalse($this->mailOptionsFactory->canCreate($this->serviceLocator, 'acmailer.mailoptions.employees'));
        $this->assertFalse($this->mailOptionsFactory->canCreate($this->serviceLocator, 'foo'));
        $this->assertFalse($this->mailOptionsFactory->canCreate($this->serviceLocator, 'invalid.mailoptions.foobar'));
        $this->assertFalse($this->mailOptionsFactory->canCreate(new ServiceManagerMock(['Config' => []]), 'acmailer.mailoptions.default'));
    }