Skip to content

Commit

Permalink
test: remove constructor override from product settings hooks test
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Oct 16, 2023
1 parent 842a44e commit aa28102
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tests/Unit/Pdk/Hooks/PdkProductSettingsHooksTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
use MyParcelNL\Pdk\Facade\Pdk;
use MyParcelNL\Pdk\Settings\Model\ProductSettings;
use MyParcelNL\Pdk\Shipment\Model\DeliveryOptions;
use MyParcelNL\Pdk\Tests\Bootstrap\MockPdkProductRepository;
use MyParcelNL\Pdk\Types\Service\TriStateService;
use MyParcelNL\WooCommerce\Tests\Uses\UsesMockWcPdkInstance;
use WC_Product;
use function DI\autowire;
use function MyParcelNL\Pdk\Tests\usesShared;
use function MyParcelNL\WooCommerce\Tests\wpFactory;

Expand All @@ -37,16 +35,7 @@ function defaultProductSettings(): array
];
}

usesShared(
new UsesMockWcPdkInstance([
PdkProductRepositoryInterface::class => autowire(MockPdkProductRepository::class)->constructor([
[
'externalIdentifier' => '7000',
'settings' => defaultProductSettings(),
],
]),
])
);
usesShared(new UsesMockWcPdkInstance());

it('saves product data correctly', function (array $postData, array $productSettings) {
/** @var PdkProductRepositoryInterface $productRepository */
Expand Down

0 comments on commit aa28102

Please sign in to comment.