canCreate() public method

Determine if we can create a service with name
public canCreate ( Interop\Container\ContainerInterface $container, $requestedName ) : boolean
$container Interop\Container\ContainerInterface
$requestedName
return boolean
 public function testCanCreateServiceWhenConcreteServiceIsNotDefined()
 {
     $sm = $this->createServiceManager(['acmailer_options' => ['concrete' => []]]);
     $this->assertTrue($this->factory->canCreate($sm, 'sendMailConcrete'));
     $this->assertFalse($this->factory->canCreate($sm, 'sendMailInvalid'));
 }