Daniel J. Summers
d067f8983f
- Add In/InArray support - Add ORDER BY support for `Find` functions - Update dependencies - Implement fixes identified via static analysis Reviewed-on: #5
29 lines
708 B
PHP
29 lines
708 B
PHP
<?php
|
|
/**
|
|
* @author Daniel J. Summers <daniel@bitbadger.solutions>
|
|
* @license MIT
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Test\Unit\Mapper;
|
|
|
|
use BitBadger\PDODocument\Mapper\ArrayMapper;
|
|
use PHPUnit\Framework\Attributes\TestDox;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
/**
|
|
* Unit tests for the ArrayMapper class
|
|
*/
|
|
#[TestDox('Array Mapper (Unit tests)')]
|
|
class ArrayMapperTest extends TestCase
|
|
{
|
|
#[TestDox('map() succeeds')]
|
|
public function testMapSucceeds(): void
|
|
{
|
|
$result = ['one' => 2, 'three' => 4, 'eight' => 'five'];
|
|
$mapped = (new ArrayMapper())->map($result);
|
|
$this->assertSame($result, $mapped, 'The array mapper should return the parameter given to it');
|
|
}
|
|
}
|