Exemplo n.º 1
0
 public function it_exposes_all_ranges_built_by_aggregators(KeyGenerator $keyGenerator, CodepointAssigned $item)
 {
     $key = 'key';
     $cp = Codepoint::fromInt(1);
     $item->getCodepoint()->willReturn($cp);
     $keyGenerator->generateFor($item)->willReturn($key);
     $this->beConstructedWith($keyGenerator);
     $this->add($item);
     $this->getAllRanges()->shouldBeLike([$key => Range\Collection::fromArray([Range::between($cp, $cp)])]);
 }
Exemplo n.º 2
0
 /**
  * @param CodepointAssigned $entity
  * @return string
  */
 public function generateFor(CodepointAssigned $entity)
 {
     $properties = $entity->getGeneralProperties();
     return (string) $properties->getScript();
 }
Exemplo n.º 3
0
 private function givenEntityHasCodepointWithValue(CodepointAssigned $entity, $value)
 {
     $entity->getCodepoint()->willReturn(Codepoint::fromInt($value));
 }