/** @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()); }
/** @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()); }