diff --git a/src/Contract/ParserInterface.php b/src/Contract/ParserInterface.php new file mode 100644 index 0000000..b45ad91 --- /dev/null +++ b/src/Contract/ParserInterface.php @@ -0,0 +1,10 @@ +total; } -} +} \ No newline at end of file diff --git a/tests/src/Unit/TurnTest.php b/tests/src/Unit/TurnTest.php index 1e050de..f952013 100644 --- a/tests/src/Unit/TurnTest.php +++ b/tests/src/Unit/TurnTest.php @@ -27,6 +27,16 @@ public function tearDown(): void unset($this->turn); } + /** + * @covers \Ouxsoft\LuckByDice\Turn::set + */ + public function testSet() + { + $this->turn->set("d3+3*3"); + $outcome = $this->turn->roll(); + $this->assertIsInt($outcome); + } + /** * @covers \Ouxsoft\LuckByDice\Turn::roll */ @@ -37,4 +47,14 @@ public function testRoll() $this->assertIsInt($outcome); } + /** + * @covers \Ouxsoft\LuckByDice\Turn::__toString + */ + public function test__toString() + { + $this->turn->set("d6"); + $outcome = (string) $this->turn; + $this->assertIsString($outcome); + } + }