Beispiel #1
0
 /**
  * @param string $text
  */
 public function __construct($text = null)
 {
     if (strlen($text) > self::MAX_LENGTH) {
         throw new TitleTooLongException($text, self::MAX_LENGTH);
     }
     parent::__construct($text);
 }
Beispiel #2
0
 function it_is_not_equal_to_different_text(Text $text)
 {
     $text->getText()->willReturn('Some other string');
     $this->equals($text)->shouldBe(false);
 }
 function it_slugifies_a_text(Text $text)
 {
     $text->__toString()->willReturn('someCrazyTTText');
     $this->slugify($text)->shouldBeAnInstanceOf(Slug::class);
 }