示例#1
0
 public function testCellWithFourNighbours()
 {
     $cell = new Cell();
     $cell->livingStatus(true);
     $cell->addNighbours(4);
     $newCell = $cell->nextGen();
     $this->assertFalse($cell->isAlive(), 'This test is okay');
 }
示例#2
0
 /**
  * @test
  */
 public function switchAliveCellToDeath()
 {
     $this->object->setNextState(false);
     $this->object->switchToNextState();
     $this->assertFalse($this->object->isAlive());
 }