Exemple #1
0
 public function it_can_provide_all_codepoint_assigned_entities_in_a_given_general_category()
 {
     $characters = Character\Collection::fromArray([]);
     $codepoint = Codepoint::fromInt(1);
     $ranges = Codepoint\Range\Collection::fromArray([$codepoint]);
     $category = GeneralCategory::fromValue(GeneralCategory::SYMBOL_MATH);
     $this->repository->getCodepointsByCategory($category)->willReturn($ranges);
     $this->repository->getByCodepoints($ranges->expand())->willReturn($characters);
     $this->getByCategory($category)->shouldReturn($characters);
 }
Exemple #2
0
 /**
  * @test
  */
 public function it_can_provide_all_codepoints_residing_in_a_specific_category()
 {
     $category = GeneralCategory::fromValue(GeneralCategory::OTHER_CONTROL);
     $codepoints = $this->repository->getCodepointsByCategory($category);
     ha::assertThat('count', count($codepoints), hm::is(hm::equalTo(1)));
 }
Exemple #3
0
 /**
  * @param GeneralCategory $category
  * @throws Repository\BlockNotFoundException
  * @return Codepoint\Range\Collection
  */
 public function getCodepointsByCategory(GeneralCategory $category)
 {
     return $this->sourceRepository->getCodepointsByCategory($category);
 }
 /**
  * {@inheritDoc}
  */
 public function getCodepointsByCategory(GeneralCategory $category)
 {
     $this->logMethodCall(__FUNCTION__);
     return $this->delegate->getCodepointsByCategory($category);
 }