public function it_can_provide_all_codepoint_assigned_entities_in_a_specific_block() { $characters = Character\Collection::fromArray([]); $codepoint = Codepoint::fromInt(1); $ranges = Codepoint\Range\Collection::fromArray([$codepoint]); $block = Block::fromValue(Block::AEGEAN_NUMBERS); $this->repository->getCodepointsByBlock($block)->willReturn($ranges); $this->repository->getByCodepoints($ranges->expand())->willReturn($characters); $this->getByBlock($block)->shouldReturn($characters); }
/** * @test */ public function it_can_provide_all_codepoints_residing_in_a_block() { $block = Block::fromValue(Block::BASIC_LATIN); $codepoints = $this->repository->getCodepointsByBlock($block); ha::assertThat('count', count($codepoints), hm::is(hm::equalTo(1))); }
/** * @param Block $block * @throws Repository\BlockNotFoundException * @return Codepoint\Range\Collection */ public function getCodepointsByBlock(Block $block) { return $this->sourceRepository->getCodepointsByBlock($block); }
/** * {@inheritDoc} */ public function getCodepointsByBlock(Block $block) { $this->logMethodCall(__FUNCTION__); return $this->delegate->getCodepointsByBlock($block); }