diff --git a/src/arenas/tron/test/DirectionTest.php b/src/arenas/tron/test/DirectionTest.php index a814366..b381382 100644 --- a/src/arenas/tron/test/DirectionTest.php +++ b/src/arenas/tron/test/DirectionTest.php @@ -1 +1,64 @@ -assertInstanceOf(Direction::class,Direction::make($validString)); + } + + /** + * @dataProvider validStrings + */ + public function testToString($validString){ + $this->assertTrue(Direction::make($validString) == $validString); + } + + /** + * @dataProvider validStrings + */ + public function testOpposite($validString){ + $dir = Direction::make($validString); + $op = $dir->opposite(); + + $this->assertInstanceOf(Direction::class,$op); + $this->assertFalse($dir == $op); + } + + /** + * @dataProvider validStrings + */ + public function testOppositeOpposite($validString){ + $dir = Direction::make($validString); + $opop = $dir->opposite()->opposite(); + $this->assertTrue($dir == $opop); + } + + +} \ No newline at end of file