mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-06-26 04:21:36 +00:00
Removed useless setAccessible() calls
They are noop since 8.1 and we only support 8.2+
This commit is contained in:
parent
5e18ae2874
commit
9d4dabbd20
5 changed files with 2 additions and 18 deletions
|
|
@ -77,7 +77,6 @@ final class BuerklinProviderTest extends TestCase
|
|||
public function testAttributesToParametersParsesUnitsAndValues(): void
|
||||
{
|
||||
$method = new \ReflectionMethod(BuerklinProvider::class, 'attributesToParameters');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$features = [
|
||||
[
|
||||
|
|
@ -127,7 +126,6 @@ final class BuerklinProviderTest extends TestCase
|
|||
public function testComplianceParameters(): void
|
||||
{
|
||||
$method = new \ReflectionMethod(BuerklinProvider::class, 'complianceToParameters');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$product = [
|
||||
'labelRoHS' => 'Yes',
|
||||
|
|
@ -158,7 +156,6 @@ final class BuerklinProviderTest extends TestCase
|
|||
public function testImageSelectionPrefersZoomAndDeduplicates(): void
|
||||
{
|
||||
$method = new \ReflectionMethod(BuerklinProvider::class, 'getProductImages');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$images = [
|
||||
['format' => 'product', 'url' => '/img/a.webp'],
|
||||
|
|
@ -176,7 +173,6 @@ final class BuerklinProviderTest extends TestCase
|
|||
public function testFootprintExtraction(): void
|
||||
{
|
||||
$method = new \ReflectionMethod(BuerklinProvider::class, 'getPartDetail');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$product = [
|
||||
'code' => 'TEST1',
|
||||
|
|
@ -212,7 +208,6 @@ final class BuerklinProviderTest extends TestCase
|
|||
];
|
||||
|
||||
$method = new \ReflectionMethod(BuerklinProvider::class, 'pricesToVendorInfo');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$vendorInfo = $method->invoke($this->provider, 'SKU1', 'https://x', $detailPrice);
|
||||
|
||||
|
|
@ -260,7 +255,6 @@ final class BuerklinProviderTest extends TestCase
|
|||
);
|
||||
|
||||
$method = new \ReflectionMethod(BuerklinProvider::class, 'convertPartDetailToSearchResult');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$dto = $method->invoke($this->provider, $detail);
|
||||
|
||||
|
|
@ -273,13 +267,13 @@ final class BuerklinProviderTest extends TestCase
|
|||
{
|
||||
$this->assertSame(['buerklin.com'], $this->provider->getHandledDomains());
|
||||
}
|
||||
|
||||
|
||||
#[DataProvider('buerklinIdFromUrlProvider')]
|
||||
public function testGetIDFromURLExtractsId(string $url, ?string $expected): void
|
||||
{
|
||||
$this->assertSame($expected, $this->provider->getIDFromURL($url));
|
||||
}
|
||||
|
||||
|
||||
public static function buerklinIdFromUrlProvider(): \Iterator
|
||||
{
|
||||
yield 'de long path' => [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue