Ejemplo n.º 1
0
 /**
  * Test getter and setter of status property.
  *
  * @covers AppBundle\Entity\Validation::setStatus()
  * @covers AppBundle\Entity\Validation::getStatus()
  */
 public function testStatus()
 {
     $this->validation->setStatus(Validation::ACCEPTE);
     $this->assertEquals(Validation::ACCEPTE, $this->validation->getStatus());
     $this->assertTrue($this->validation->isEnabled());
     $this->assertFalse($this->validation->isWaiting());
     $this->assertFalse($this->validation->isRejected());
     $this->validation->setStatus(Validation::EN_ATTENTE);
     $this->assertEquals(Validation::EN_ATTENTE, $this->validation->getStatus());
     $this->assertFalse($this->validation->isEnabled());
     $this->assertTrue($this->validation->isWaiting());
     $this->assertFalse($this->validation->isRejected());
     $this->validation->setStatus(Validation::REFUSE);
     $this->assertEquals(Validation::REFUSE, $this->validation->getStatus());
     $this->assertFalse($this->validation->isEnabled());
     $this->assertFalse($this->validation->isWaiting());
     $this->assertTrue($this->validation->isRejected());
 }