예제 #1
0
 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);
 }
예제 #2
0
 /**
  * @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)));
 }
예제 #3
0
 /**
  * @param Script $script
  * @throws Repository\BlockNotFoundException
  * @return Codepoint\Range\Collection
  */
 public function getCodepointsByScript(Script $script)
 {
     return $this->sourceRepository->getCodepointsByScript($script);
 }
예제 #4
0
 /**
  * {@inheritDoc}
  */
 public function getCodepointsByScript(Script $script)
 {
     $this->logMethodCall(__FUNCTION__);
     return $this->delegate->getCodepointsByScript($script);
 }