function it_should_execute_all_child_operations($connection, $dispatcher, OperationHandler $handler, DeleteOperation $operation, AddOperation $preOperation, AddOperation $postOperation)
{
$handler->supports($operation)->willReturn(true);
$handler->supports($preOperation)->willReturn(true);
$handler->supports($postOperation)->willReturn(true);
$handler->setConnection($connection)->shouldBeCalled();
$handler->setEventDispatcher($dispatcher)->shouldBeCalled();
$handler->setOperationDefaults($operation)->shouldBeCalled();
$handler->setOperationDefaults($preOperation)->shouldBeCalled();
$handler->setOperationDefaults($postOperation)->shouldBeCalled();
$handler->execute($operation)->shouldBeCalled();
$handler->execute($preOperation)->shouldBeCalled();
$handler->execute($postOperation)->shouldBeCalled();
$operation->getServer()->willReturn('foo');
$operation->getControls()->willReturn([]);
$operation->getPreOperations()->willReturn([$preOperation]);
$operation->getPostOperations()->willReturn([$postOperation]);
foreach ([$preOperation, $postOperation] as $op) {
$op->getServer()->willReturn('foo');
$op->getControls()->willReturn([]);
$op->getPreOperations()->willReturn([]);
$op->getPostOperations()->willReturn([]);
}
$this->addHandler($handler);
$this->execute($operation);
}