$criteria =
new Criteria([$this->paymentMethodId
]);
$resultSet =
$this->paymentRepository->
search($criteria,
$defaultContext);
static::
assertCount(0,
$resultSet);
} public function testPluginPaymentMethodCanNotBeDeleted(): void
{ $defaultContext = Context::
createDefaultContext();
$paymentMethod =
$this->
createPaymentMethodDummyArray();
$paymentMethod[0
]['pluginId'
] =
$this->
addPlugin($defaultContext);
$this->paymentRepository->
create($paymentMethod,
$defaultContext);
$primaryKey =
[ 'id' =>
$this->paymentMethodId,
];
try { $this->paymentRepository->
delete([$primaryKey],
$defaultContext);
static::
fail('this should not be reached'
);
} catch (PluginPaymentMethodsDeleteRestrictionException|PaymentException
$e) {