tests/GameOfLife/FieldTest.php
/**
     * Checks whether the default values are applied when constructing a Field.
     *
     * @covers \GameOfLife\Field::__construct()
     * @covers \GameOfLife\Field::parentBoard()
     * @covers \GameOfLife\Field::x()
     * @covers \GameOfLife\Field::y()
     * @covers \GameOfLife\Field::value()
     */
Checks whether the default values are applied when constructing a Field.
Checks whether the default values are applied when constructing a Field .
public function testCanBeConstructed()
    {
        $field = new Field(1, 2, false, $this->board);
        $this->assertEquals($this->board, $field->parentBoard());
        $this->assertEquals(1, $field->x());
        $this->assertEquals(2, $field->y());
        $this->assertEquals(false, $field->value());
    }
public function testCanBeConstructed ( ) { $ field = new Field ( 1 , 2 , false , $ this -> board ) ; $ this -> assertEquals ( $ this -> board , $ field -> parentBoard ( ) ) ; $ this -> assertEquals ( 1 , $ field -> x ( ) ) ; $ this -> assertEquals ( 2 , $ field -> y ( ) ) ; $ this -> assertEquals ( false , $ field -> value ( ) ) ; }
Checks whether the default values are applied when constructing a Field.
Checks whether the default values are applied when constructing a Field .