Created
January 11, 2016 03:05
-
-
Save carlosbelisario/790574b289899627a5e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Tests\Entity; | |
use \PHPUnit_Framework_TestCase as TestCase; | |
use AppBundle\Entity\Album; | |
use AppBundle\Entity\Artista; | |
/** | |
* Class AlbumTest | |
* @package AppBundle\Tests\Entity | |
* @author Carlos Belisario <carlos.belisario.gonzalez@gmail.com> | |
*/ | |
class AlbumTest extends TestCase | |
{ | |
/** | |
* @var Album $album | |
*/ | |
private $album; | |
/** | |
* | |
* prueba la existencia e instancia de un nuevo objeto tipo Album | |
* @test | |
*/ | |
public function testAlbumInitialCount() | |
{ | |
$this->assertEquals(1, count($this->album)); | |
} | |
/** | |
* probamos el poder agregar artistas al album | |
* @test | |
*/ | |
public function testAddArtista() | |
{ | |
$this->album->AddArtista(new Artista()); | |
$this->album->AddArtista(new Artista()); | |
$this->album->AddArtista(new Artista()); | |
$this->assertEquals(3, count($this->album->getArtista())); | |
} | |
/** | |
* @inheritdoc | |
*/ | |
public function setUp() | |
{ | |
$this->album = new Album(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment