コード例 #1
0
ファイル: PostTest.php プロジェクト: aranajhonny/platzi-php
 /** @test */
 function it_gives_us_the_author_name()
 {
     $author = new \PlatziPHP\Domain\Author('mail', '1234', 'AUTOR_DE_PLATZI');
     $author->setName('jhonny', 'arana');
     $post = new PlatziPHP\Domain\Post($author, 'A title post', 'A body post');
     $this->assertEquals('By jhonny', $post->getAuthor());
 }
コード例 #2
0
ファイル: PostTest.php プロジェクト: heroseven/platziphp
 /** @test */
 function it_gives_us_the_author_name()
 {
     $author = new \PlatziPHP\Domain\Author('email', '1234', 'AUTOR_DE_PLATZI');
     $author->setName('Guido', 'Woda');
     $post = new \PlatziPHP\Domain\Post($author, 'A Title', 'A post body');
     $this->assertEquals('by Guido', $post->getAuthor());
 }