public function handleCreateExpenseListCommand(CreateExpenseListCommand $command) { $this->expenseListRepository->add(ExpenseList::named(new ExpenseListId($command->getId()), $command->getName(), $command->getAccountId())); }
/** * @Then /^the expense list should not be saved$/ */ public function theExpenseListShouldNotBeSaved() { $expenseList = $this->repository->findByName(null); \PHPUnit_Framework_Assert::assertNull($expenseList); }