コード例 #1
0
ファイル: Title.php プロジェクト: Rybbow/x-blog
 /**
  * @param string $text
  */
 public function __construct($text = null)
 {
     if (strlen($text) > self::MAX_LENGTH) {
         throw new TitleTooLongException($text, self::MAX_LENGTH);
     }
     parent::__construct($text);
 }
コード例 #2
0
ファイル: TextSpec.php プロジェクト: Rybbow/x-blog
 function it_is_not_equal_to_different_text(Text $text)
 {
     $text->getText()->willReturn('Some other string');
     $this->equals($text)->shouldBe(false);
 }
コード例 #3
0
 function it_slugifies_a_text(Text $text)
 {
     $text->__toString()->willReturn('someCrazyTTText');
     $this->slugify($text)->shouldBeAnInstanceOf(Slug::class);
 }