You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
coffee-table/tests/Coffee/TileTest.php

47 lines
1.2 KiB

<?php
namespace Coffee;
// This is not necessary, since it is bootstrapped but serves for debugging purposes
require __DIR__ . '/../../vendor/autoload.php';
class TileTest extends \PHPUnit_Framework_TestCase {
public function testRepresentingSpot() {
$tile = new Tile(2, 2, Tile::REPRESENTS_SPOT);
$this->assertTrue($tile->isRepresentingSpot());
}
public function testRepresentingVoid() {
$tile = new Tile(2, 2, Tile::REPRESENTS_VOID);
$this->assertTrue($tile->isRepresentingVoid());
}
// public function testGetPosition() {
// $row = 2;
// $column = 2;
//
// $tile = new Tile($row, $column, Tile::REPRESENTS_VOID);
// $position = new Tile($row, $column);
//
// $this->assertEquals($position, $tile->getPosition());
//
// }
public function testIsVisited() {
$tile = new Tile(2, 2, Tile::REPRESENTS_SPOT);
$tile->visit();
$this->assertTrue($tile->isVisited());
}
public function testSpotNumber() {
$tile = new Tile(2, 2, Tile::REPRESENTS_SPOT);
$tile->setSpotNumber(4);
$this->assertEquals(4, $tile->getSpotNumber());
}
}