public function it_can_provide_all_codepoint_assigned_entities_in_a_given_script() { $characters = Character\Collection::fromArray([]); $codepoint = Codepoint::fromInt(1); $ranges = Codepoint\Range\Collection::fromArray([$codepoint]); $script = Script::fromValue(Script::COMMON); $this->repository->getCodepointsByScript($script)->willReturn($ranges); $this->repository->getByCodepoints($ranges->expand())->willReturn($characters); $this->getByScript($script)->shouldReturn($characters); }
/** * @test */ public function it_can_provide_all_codepoints_residing_in_a_specific_script() { $script = Script::fromValue(Script::COMMON); $codepoints = $this->repository->getCodepointsByScript($script); ha::assertThat('count', count($codepoints), hm::is(hm::equalTo(1))); }
/** * @param Script $script * @throws Repository\BlockNotFoundException * @return Codepoint\Range\Collection */ public function getCodepointsByScript(Script $script) { return $this->sourceRepository->getCodepointsByScript($script); }
/** * {@inheritDoc} */ public function getCodepointsByScript(Script $script) { $this->logMethodCall(__FUNCTION__); return $this->delegate->getCodepointsByScript($script); }