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.
33 lines
705 B
33 lines
705 B
8 years ago
|
<?php
|
||
|
|
||
|
namespace Coffee;
|
||
8 years ago
|
|
||
8 years ago
|
// This is not necessary, since it is bootstrapped but serves for debugging purposes
|
||
8 years ago
|
require __DIR__ . '/../../vendor/autoload.php';
|
||
8 years ago
|
|
||
8 years ago
|
class TableTest extends \PHPUnit_Framework_TestCase {
|
||
|
|
||
8 years ago
|
public function testGetSpots() {
|
||
|
|
||
8 years ago
|
$position = new Position(0, 0);
|
||
8 years ago
|
$spot = new Spot();
|
||
8 years ago
|
$table = new Table();
|
||
8 years ago
|
$spot->addPosition($position);
|
||
8 years ago
|
$table->addSpot($spot);
|
||
|
$this->assertEquals([$spot], $table->getSpots());
|
||
|
}
|
||
|
|
||
|
public function testSpotsCount() {
|
||
|
|
||
8 years ago
|
$position = new Position(0, 0);
|
||
8 years ago
|
$spot = new Spot();
|
||
8 years ago
|
$table = new Table();
|
||
8 years ago
|
$spot->addPosition($position);
|
||
8 years ago
|
$table->addSpot($spot);
|
||
|
$table->addSpot($spot);
|
||
|
$this->assertEquals(2, $table->getSpotsCount());
|
||
|
}
|
||
8 years ago
|
|
||
|
|
||
8 years ago
|
}
|