/**
  * @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());
 }
Beispiel #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());
 }
Beispiel #3
0
 /** @test */
 function Muestrame_el_nombre_del_autor()
 {
     $author = new \PlatziPHP\Author('*****@*****.**', 'crispi007', 'AUTOR_DE_PLATZI');
     $author->name('Marc', 'Gimenez');
     $post = new \PlatziPHP\Post($author, 'Un titulo', 'un cuerpo');
     $this->assertEquals('by Marc', $post->getAuthor());
 }
 /** @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());
 }
Beispiel #5
0
 /**
  * @test
  */
 function it_gives_us_the_author_name_in_post()
 {
     $author = new PlatziPHP\Author("*****@*****.**", "fake", "AUTOR_DE_PLATZI");
     $author->setLastname('vargas');
     $post = new PlatziPHP\Post($author, 'titulo', 'este es el body');
     $this->assertEquals('', $post->getAuthor());
 }
Beispiel #6
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());
 }
Beispiel #7
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);
Beispiel #8
0
<?php

/**
 * Created by PhpStorm.
 * User: usuario
 * Date: 29/01/2016
 * Time: 16:25
 */
require_once 'vendor/autoload.php';
$user = new \PlatziPHP\Author('*****@*****.**', '1234');
$user->name('Marc', 'Gimenez Molina');
echo $user->getFirstName();
echo $user->getLastName();
echo PHP_EOL;
//var_dump($user);
Beispiel #9
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);
Beispiel #10
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);
Beispiel #11
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);
Beispiel #12
0
<?php

/**
 * Created by PhpStorm.
 * User: stephan
 * Date: 25/12/15
 * Time: 06:26 PM
 */
require_once 'vendor/autoload.php';
$user = new \PlatziPHP\Author('*****@*****.**', '1234');
//var_dump($user);
//echo $user;
$user->setLastname('vargas');
echo $user->getLastName();
echo PHP_EOL;
Beispiel #13
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();