tests/GameOfLife/BoardTest.php
/**
     * @dataProvider calculateFillPercentProvider
     *
     * @param array $_cells     Cells that will be set to true
     * @param float $_expected  Expected fill percentage
     */
@dataProvider calculateFillPercentProvider
@param array $_cells     Cells that will be set to true
@param float $_expected  Expected fill percentage
@dataProvider calculateFillPercentProvider @param array $_cells Cells that will be set to true @param float $_expected Expected fill percentage
public function testCanCalculateFillPercent(array $_cells, float $_expected)
    {
        $this->board->setWidth(5);
        $this->board->setHeight(10);
        foreach ($_cells as $cell)
        {
            $this->board->setField($cell[0],$cell[1], true);
        }
        $this->assertEquals($_expected, $this->board->getFillPercentage());
    }
public function testCanCalculateFillPercent ( array $ _cells , float $ _expected ) { $ this -> board -> setWidth ( 5 ) ; $ this -> board -> setHeight ( 10 ) ; foreach ( $ _cells as $ cell ) { $ this -> board -> setField ( $ cell [ 0 ] , $ cell [ 1 ] , true ) ; } $ this -> assertEquals ( $ _expected , $ this -> board -> getFillPercentage ( ) ) ; }
@dataProvider calculateFillPercentProvider
 @param array $_cells     Cells that will be set to true
 @param float $_expected  Expected fill percentage
@dataProvider calculateFillPercentProvider @param array $_cells Cells that will be set to true @param float $_expected Expected fill percentage