예제 #1
0
 /**
  * @test
  *
  * $this->getMock('\_OurBrand_\Quiz\Domain\Model\')
  */
 public function testGetters()
 {
     $level = $this->getMock('\\_OurBrand_\\Quiz\\Domain\\Model\\TeamLevel', array(), array('Test teamlevel', 1));
     $imageResource = $this->getMock('\\_OurBrand_\\Quiz\\Domain\\Model\\ImageResource');
     $lastEdited = new \DateTime();
     $quiz = new \_OurBrand_\Quiz\Domain\Model\Quiz();
     $quiz->setType(1);
     $quiz->setDuration(300);
     $quiz->setTitle('Quiz Title');
     $quiz->setWasCopyOf('Original Title');
     $quiz->setAuthor('Tester');
     $quiz->setBannerImage($imageResource);
     $quiz->setIntroduction('Introduction test');
     $quiz->setDescription('Description test');
     $quiz->setCreator('Creator');
     $quiz->setIsLanguage(1);
     $quiz->setLastEdited($lastEdited);
     $quiz->setSharing(1);
     $quiz->setIsDraft(1);
     $quiz->setIsDeleted(0);
     $this->assertEquals(1, $quiz->getType());
     $this->assertEquals(300, $quiz->getDuration());
     $this->assertEquals('Quiz Title', $quiz->getTitle());
     $this->assertEquals('Original Title', $quiz->getWasCopyOf());
     $this->assertEquals('Tester', $quiz->getAuthor());
     $this->assertEquals($imageResource, $quiz->getBannerImage());
     $this->assertEquals('Introduction test', $quiz->getIntroduction());
     $this->assertEquals('Description test', $quiz->getDescription());
     $this->assertEquals('Creator', $quiz->getCreator());
     $this->assertEquals(1, $quiz->getIsLanguage());
     $this->assertEquals($lastEdited->getTimestamp(), $quiz->getLastEdited()->getTimestamp());
     $this->assertEquals(1, $quiz->getSharing());
     $this->assertEquals(1, $quiz->getIsDraft());
     $this->assertEquals(0, $quiz->getIsDeleted());
 }