예제 #1
0
파일: PostTest.php 프로젝트: juandgomez/php
 /** @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());
 }
예제 #2
0
파일: _prueba.php 프로젝트: juandgomez/php
<?php

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