/** @test */ public function it_should_not_allow_open_an_account_to_an_owner_that_already_has_one() { $this->setExpectedException(AccountOwnerAlreadyHasAnAccountException::class); $event = PlayerRegisteredStub::random(); $owner = AccountOwnerStub::create($event->aggregateId()); $this->shouldSearchAccount($owner, AccountStub::owned($owner)); $this->subscriber->notify($event); }
/** @test */ public function it_should_return_null_finding_a_player_that_does_not_exists() { $account = AccountStub::random(); $this->assertNull($this->repository()->search($account->owner())); }