/** * @test */ public function it_can_provide_all_held_characters() { $characters = $this->repository->getAll(); $tally = 0; foreach ($characters as $character) { $tally++; ha::assertThat('character', $character, hm::is(hm::anInstanceOf(Character::class))); } ha::assertThat('count', $tally, hm::is(hm::equalTo(1))); }
private function givenTheRepositoryContains(array $items) { $unwrapped = array_map(function (Collaborator $c) { return $c->getWrappedObject(); }, $items); $this->repository->getAll()->willReturn(Collection::fromArray($unwrapped)); }
/** * @return Collection|CodepointAssigned[] */ public function all() { return $this->sourceRepository->getAll(); }
/** * {@inheritDoc} */ public function getAll() { $this->logMethodCall(__FUNCTION__); return $this->delegate->getAll(); }