Update testdox for remaining unit tests

This commit is contained in:
2024-09-22 20:18:17 -04:00
parent 294b608ac8
commit 91bf3128c5
12 changed files with 69 additions and 48 deletions

View File

@@ -18,6 +18,7 @@ use PHPUnit\Framework\TestCase;
#[TestDox('String Mapper (Unit tests)')]
class StringMapperTest extends TestCase
{
#[TestDox('map() succeeds when field is present and string')]
public function testMapSucceedsWhenFieldIsPresentAndString(): void
{
$result = ['test_field' => 'test_value'];
@@ -25,6 +26,7 @@ class StringMapperTest extends TestCase
$this->assertEquals('test_value', $mapper->map($result), 'String value not returned correctly');
}
#[TestDox('map() succeeds when field is present and not string')]
public function testMapSucceedsWhenFieldIsPresentAndNotString(): void
{
$result = ['a_number' => 6.7];
@@ -32,6 +34,7 @@ class StringMapperTest extends TestCase
$this->assertEquals('6.7', $mapper->map($result), 'Number value not returned correctly');
}
#[TestDox('map() succeeds when field is not present')]
public function testMapSucceedsWhenFieldIsNotPresent(): void
{
$mapper = new StringMapper('something_else');