예제 #1
0
 /**
  * @test
  */
 function it_prints_author_text()
 {
     $author = new \PlatziPHP\Author("*****@*****.**", '123456', 'AUTOR_DE_PLATZI');
     $author->setName('alexander', 'montaña');
     $post = new \PlatziPHP\Post($author, 'My first Post', 'This is the content of my firstPost');
     $this->assertEquals('by alexander', $post->printAuthor());
 }
예제 #2
0
 /** @test */
 function it_gives_us_the_author_name()
 {
     $author = new \PlatziPHP\Author('email', '1234', 'AUTOR_DE_PLATZI');
     $author->setName('Hector', 'Flores');
     $post = new \PlatziPHP\Post($author, 'A Title', 'A post body');
     $this->assertEquals('by Hector', $post->getAuthor());
 }
예제 #3
0
 /** @test */
 function it_give_user_the_author_name()
 {
     $autor = new \PlatziPHP\Author('*****@*****.**', 'platzi', 'AUTOR_DE_PLATZI');
     $autor->setName('jesus', 'HERRERA');
     $post = new \PlatziPHP\Post($autor, 'titulo', 'body');
     $this->assertEquals('by jesus', $post->getAuthor());
 }
예제 #4
0
 /** @test */
 function it_gives_us_the_author_name()
 {
     // It creates and object $author from the Author class and
     // send as params three strings.
     $author = new \PlatziPHP\Author('email', '1234', 'AUTOR_DE_PLATZI');
     // Sets the Name for the $author
     $author->setName('Juan', 'Roa');
     // Creates an object $post of the Post class and
     // send as params: $author and two strings
     $post = new \PlatziPHP\Post($author, 'A Title', 'A post body');
     // Verifies that the assert equals to $post->getAuthor()
     $this->assertEquals('by Juan', $post->getAuthor());
 }
예제 #5
0
<?php

require_once 'vendor/autoload.php';
$user = new \PlatziPHP\Author('*****@*****.**', '1234');
$user->setName('Hector', 'Flores');
echo $user->getFirstName();
echo $user->getLastName();
echo PHP_EOL;
//var_dump($user);
예제 #6
0
<?php

require_once 'vendor/autoload.php';
$user = new \PlatziPHP\Author('*****@*****.**', '1234');
$user->setName('Juan', 'Roa');
echo $user->getFirstName();
echo $user->getLastName();
echo PHP_EOL;
//var_dump($user);
예제 #7
0
<?php

require_once 'vendor/autoload.php';
$user = new \PlatziPHP\Author('*****@*****.**', '1234');
$user->setName('jhonny', 'arana');
echo $user->getLastName();
echo PHP_EOL;
echo $user->getFirstName();
echo PHP_EOL;
//var_dump($user);
예제 #8
0
<?php

/**
 * Created by PhpStorm.
 * User: jair
 * Date: 23/11/15
 * Time: 11:46 AM
 */
require_once 'vendor/autoload.php';
$user = new \PlatziPHP\Author('*****@*****.**', '1234');
$user->setName('Jair', 'Revilla');
echo $user->getFirstName();
echo PHP_EOL;
//var_dump($user);
예제 #9
0
<?php

require_once 'vendor/autoload.php';
$user = new \PlatziPHP\Author('*****@*****.**', '1234');
$user->setName("jesus", 'herrera');
// var_dump($user);
echo $user->getFirstName();
echo $user->getLastName();