/** @test */ function it_gives_us_the_author_name() { $author = new \platzi\Author("*****@*****.**", '1234', 'AUTOR DE PLATZI'); $author->setName("Juan David", "Gómez"); $post = new \platzi\Post($author, 'A title', 'A post body'); $this->assertEquals('by Juan David', $post->getAuthor()); }
<?php require_once './vendor/autoload.php'; $user = new \platzi\Author("*****@*****.**", "12345"); $user->setName("Juan David", "Gómez"); echo $user->getLastName() . PHP_EOL;