Applied rector to test files

This commit is contained in:
Jan Böhmer 2023-06-11 14:18:53 +02:00
parent 7ee01d9a05
commit 98dc553938
46 changed files with 42 additions and 102 deletions

View file

@ -49,10 +49,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
class BarcodeContentGeneratorTest extends KernelTestCase
{
/**
* @var BarcodeContentGenerator
*/
private $service;
private ?object $service = null;
protected function setUp(): void
{

View file

@ -75,14 +75,14 @@ class BarcodeNormalizerTest extends WebTestCase
[['lot', 10], 'Lß000010'],
[['part', 123], 'P-000123'],
[['location', 123], 'S-000123'],
[['lot', 12345678], 'L-12345678'],
[['lot', 12_345_678], 'L-12345678'],
//Legacy storelocation format
[['location', 336], '$L00336'],
[['location', 12345678], '$L12345678'],
[['location', 12_345_678], '$L12345678'],
//Legacy Part format
[['part', 123], '0000123'],
[['part', 123], '00001236'],
[['part', 1234567], '12345678'],
[['part', 1_234_567], '12345678'],
];
}

View file

@ -47,10 +47,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
class BarcodeRedirectorTest extends KernelTestCase
{
/**
* @var BarcodeRedirector
*/
private $service;
private ?object $service = null;
protected function setUp(): void
{
@ -81,7 +78,7 @@ class BarcodeRedirectorTest extends KernelTestCase
{
$this->expectException(EntityNotFoundException::class);
//If we encounter an invalid lot, we must throw an exception
$this->service->getRedirectURL('lot', 12345678);
$this->service->getRedirectURL('lot', 12_345_678);
}
public function testInvalidType(): void

View file

@ -60,8 +60,6 @@ class LabelTextReplacerTest extends WebTestCase
protected function setUp(): void
{
parent::setUp();
//Get a service instance.
self::bootKernel();
$this->service = self::getContainer()->get(LabelTextReplacer::class);

View file

@ -51,10 +51,7 @@ use Twig\Sandbox\SecurityError;
class SandboxedTwigProviderTest extends WebTestCase
{
/**
* @var SandboxedTwigProvider
*/
private $service;
private ?object $service = null;
protected function setUp(): void
{