Ejemplo n.º 1
0
 /** @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());
 }
Ejemplo n.º 2
0
<?php

require_once './vendor/autoload.php';
$user = new \platzi\Author("*****@*****.**", "12345");
$user->setName("Juan David", "Gómez");
echo $user->getLastName() . PHP_EOL;