6 declare(strict_types=1);
13 use PHPUnit\Framework\TestCase;
20 private $bulkInventoryTransferValidator;
25 private $defaultSourceProvider;
30 $this->bulkInventoryTransferValidator =
42 $validationResult = $this->bulkInventoryTransferValidator->validate(
44 'non-existing-source',
45 'another-non-existing-source',
50 $validationResult->isValid(),
51 'Validation did not detect invalid source codes' 54 $errors = $validationResult->getErrors();
57 'Origin source %sourceCode does not exist',
59 'Unexpected error message from validator' 62 'Destination source %sourceCode does not exist',
64 'Unexpected error message from validator' 75 $validationResult = $this->bulkInventoryTransferValidator->validate(
83 $validationResult->isValid(),
84 'Validation wrongly detected an unknown source code' 95 $validationResult = $this->bulkInventoryTransferValidator->validate(
102 $errors = $validationResult->getErrors();
105 $validationResult->isValid(),
106 'Validation did not detect non sense transfer' 110 'Cannot transfer a source on itself',
112 'Unexpected error message from validator'
foreach($websiteCodes as $websiteCode) $skus
static getObjectManager()