Exemple #1
0
 /**
  * @depends testBoardCreation
  */
 public function testGetSquareByKey(Board $board)
 {
     $key = 'a1';
     $square = $board->getSquareBykey($key);
     $this->assertTrue($square instanceof Square);
     $this->assertEquals('black', $square->getColor());
     $this->assertEquals(1, $square->getX());
     $this->assertEquals(1, $square->getY());
     $this->assertEquals($key, $square->getKey());
     $this->assertTrue($board->getSquareByKey('h8') instanceof Square);
     $this->assertEquals(null, $board->getSquareByKey('z9'));
 }