tests/GameOfLife/FieldTest.php
/**
     * Checks whether the Field correctly returns its status.
     *
     * @covers \GameOfLife\Field::isAlive()
     * @covers \GameOfLife\Field::isDead()
     */
Checks whether the Field correctly returns its status.
Checks whether the Field correctly returns its status .
public function testCanReturnStatus()
    {
        $field = new Field(0, 0, false, $this->board);
        $field->setValue(true);
        $this->assertTrue($field->isAlive());
        $this->assertFalse($field->isDead());
        $field->setValue(false);
        $this->assertFalse($field->isAlive());
        $this->assertTrue($field->isDead());
    }
public function testCanReturnStatus ( ) { $ field = new Field ( 0 , 0 , false , $ this -> board ) ; $ field -> setValue ( true ) ; $ this -> assertTrue ( $ field -> isAlive ( ) ) ; $ this -> assertFalse ( $ field -> isDead ( ) ) ; $ field -> setValue ( false ) ; $ this -> assertFalse ( $ field -> isAlive ( ) ) ; $ this -> assertTrue ( $ field -> isDead ( ) ) ; }
Checks whether the Field correctly returns its status.
Checks whether the Field correctly returns its status .