예제 #1
0
 /**
  * @param Codepoint $codepoint
  * @param General $generalProperties
  * @throws InvalidArgumentException
  */
 public function __construct(Codepoint $codepoint, General $generalProperties)
 {
     if (!$this->isValidBlock($generalProperties->getBlock())) {
         throw new InvalidArgumentException('Surrogate should reside within a surrogate block');
     }
     parent::__construct($codepoint, $generalProperties);
 }
예제 #2
0
 public function it_should_expose_its_general_properties(General $properties)
 {
     $properties->getBlock()->willReturn(new Block(Block::HIGH_PRIVATE_USE_SURROGATES));
     $this->beConstructedWith(Codepoint::fromInt(0), $properties);
     $this->getGeneralProperties()->shouldReturn($properties);
 }