Skip to content

Commit 88a4aef

Browse files
committed
expanded literal test
1 parent 4ff823a commit 88a4aef

File tree

4 files changed

+105
-92
lines changed

4 files changed

+105
-92
lines changed

tests/Unit/Literals/BooleanTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,23 @@
3030
*/
3131
class BooleanTest extends TestCase
3232
{
33-
public function testTrue()
33+
public function testTrue(): void
3434
{
3535
$boolean = new Boolean(true);
3636

3737
$this->assertSame("true", $boolean->toQuery());
38+
$this->assertTrue($boolean->getValue());
3839
}
3940

40-
public function testFalse()
41+
public function testFalse(): void
4142
{
4243
$boolean = new Boolean(false);
4344

4445
$this->assertSame("false", $boolean->toQuery());
46+
$this->assertFalse($boolean->getValue());
4547
}
4648

47-
public function testInstanceOfBooleanType()
49+
public function testInstanceOfBooleanType(): void
4850
{
4951
$this->assertInstanceOf(BooleanType::class, new Boolean(false));
5052
}

tests/Unit/Literals/DecimalTest.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@
3030
*/
3131
class DecimalTest extends TestCase
3232
{
33-
public function testZero()
33+
public function testZero(): void
3434
{
3535
$decimal = new Decimal(0);
3636

3737
$this->assertSame("0", $decimal->toQuery());
38+
$this->assertEquals('0', $decimal->getValue());
3839
}
3940

40-
public function testInstanceOfNumeralType()
41+
public function testInstanceOfNumeralType(): void
4142
{
4243
$this->assertInstanceOf(NumeralType::class, new Decimal(0));
4344
}
@@ -47,11 +48,12 @@ public function testInstanceOfNumeralType()
4748
* @param $number
4849
* @param string $expected
4950
*/
50-
public function testToQuery($number, string $expected)
51+
public function testToQuery($number, string $expected): void
5152
{
5253
$decimal = new Decimal($number);
5354

5455
$this->assertSame($expected, $decimal->toQuery());
56+
$this->assertEquals($expected, $decimal->getValue());
5557
}
5658

5759
public function provideToQueryData(): array

0 commit comments

Comments
 (0)