spec\LdapTools\Operation\Invoker\LdapOperationInvokerSpec::it_should_NOT_switch_the_server_if_the_server_is_already_active PHP Метод

it_should_NOT_switch_the_server_if_the_server_is_already_active() публичный Метод

public it_should_NOT_switch_the_server_if_the_server_is_already_active ( OperationHandler $handler, $connection, $dispatcher )
$handler LdapTools\Operation\Handler\OperationHandler
    function it_should_NOT_switch_the_server_if_the_server_is_already_active(OperationHandler $handler, $connection, $dispatcher)
    {
        $operation = (new DeleteOperation('foo'))->setServer('foo');
        $handler->supports($operation)->willReturn(true);
        $handler->setConnection($connection)->shouldBeCalled();
        $handler->setEventDispatcher($dispatcher)->shouldBeCalled();
        $handler->setOperationDefaults($operation)->shouldBeCalled();
        $handler->execute($operation)->shouldBeCalled();
        $connection->close()->shouldNotBeCalled();
        $connection->connect(null, null, false, 'foo')->shouldNotBeCalled();
        $connection->getServer()->willReturn('foo');
        $this->addHandler($handler);
        $this->execute($operation);
    }