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

37 lines
962 B

<?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 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->setSpot(new Spot($tile));
$tile->getSpot()->setNumber(4);
$this->assertEquals(4, $tile->getSpot()->getNumber());
}
}