function it_should_NOT_switch_the_server_if_the_operation_doesnt_request_it(OperationHandler $handler, $connection, $dispatcher)
{
$operation = new DeleteOperation('foo');
$handler->supports($operation)->willReturn(true);
$handler->setConnection($connection)->shouldBeCalled();
$handler->setEventDispatcher($dispatcher)->shouldBeCalled();
$handler->setOperationDefaults($operation)->will(function () use($operation) {
$operation->setServer('foo');
});
$handler->setOperationDefaults($operation)->shouldBeCalled();
$handler->execute($operation)->shouldBeCalled();
$connection->close()->shouldNotBeCalled();
$connection->connect(null, null, false, 'foo')->shouldNotBeCalled();
$connection->connect(null, null, false, 'bar')->shouldNotBeCalled();
$connection->getServer()->willReturn('foo', 'foo');
$this->addHandler($handler);
$this->execute($operation);
}