public function it_can_register_an_aggregate_root_and_return_it(AggregateRoot $aggregateRoot, $eventRegistrationCallback, $eventBus, $saveAggregateCallback) { $aggregateRoot->addEventRegistrationCallback($eventRegistrationCallback)->shouldBeCalled(); $this->add($aggregateRoot, $eventBus, $saveAggregateCallback)->shouldReturn($aggregateRoot); }