public function testInit() { $film = new Film(array('fr' => array('synopsis' => 'Voici le synopsis du film'), 'en' => array('synopsis' => 'Here is the film synopsis'))); $datetime = new \DateTime(); $director = new Director(); $producer = new Producer(); $film->setTitle('Un long fleuve tranquille'); $film->setLengthMin(18); $film->setLengthSec(59); $film->setCompletionDate($datetime); $film->setDirector($director); $film->setProducer($producer); $film->setInformations('Some information about the film'); $film->setFirstFilm(false); $film->setColor(true); $film->setFormat('dcp'); $film->setDolbyStereo(true); $this->assertEquals('Voici le synopsis du film', $film->getContent('fr')->getSynopsis()); $this->assertEquals('Here is the film synopsis', $film->getContent('en')->getSynopsis()); $this->assertEquals('Un long fleuve tranquille', $film->getTitle()); $this->assertEquals(18, $film->getLengthMin()); $this->assertEquals(59, $film->getLengthSec()); $this->assertEquals($datetime, $film->getCompletionDate()); $this->assertEquals($director, $film->getDirector()); $this->assertEquals($producer, $film->getProducer()); $this->assertEquals('Some information about the film', $film->getInformations()); $this->assertEquals('dcp', $film->getFormat()); $this->assertTrue($film->isColor()); $this->assertTrue($film->isDolbyStereo()); $this->assertFalse($film->isFirstFilm()); }