refactor : factoriser mapStandardResponse + includesEarTagStock nullable
This commit is contained in:
@@ -8,6 +8,7 @@ use DateTimeImmutable;
|
||||
use Malio\EdnotifBundle\Bovin\Dto\InventoryDto;
|
||||
use Malio\EdnotifBundle\Bovin\Mapper\AnimalSummaryMapper;
|
||||
use Malio\EdnotifBundle\Bovin\Mapper\InventoryMapper;
|
||||
use Malio\EdnotifBundle\Shared\Mapper\StandardResponseMapper;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use stdClass;
|
||||
@@ -20,7 +21,7 @@ final class InventoryMapperTest extends TestCase
|
||||
{
|
||||
public function testMapFullInventory(): void
|
||||
{
|
||||
$mapper = new InventoryMapper(new AnimalSummaryMapper());
|
||||
$mapper = new InventoryMapper(new AnimalSummaryMapper(), new StandardResponseMapper());
|
||||
|
||||
$inventory = $mapper->map($this->makeSoapResponse(), $this->makeUnzippedMessage());
|
||||
|
||||
@@ -37,7 +38,7 @@ final class InventoryMapperTest extends TestCase
|
||||
|
||||
public function testMapInventoryWithoutMessageZipReturnsEmptyLists(): void
|
||||
{
|
||||
$mapper = new InventoryMapper(new AnimalSummaryMapper());
|
||||
$mapper = new InventoryMapper(new AnimalSummaryMapper(), new StandardResponseMapper());
|
||||
|
||||
$soapResponse = new stdClass();
|
||||
$soapResponse->ReponseStandard = new stdClass();
|
||||
|
||||
Reference in New Issue
Block a user