mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-16 22:49:36 +00:00
Ran rector and made tests final
This commit is contained in:
parent
43d72faf48
commit
b21d294cf8
162 changed files with 407 additions and 393 deletions
|
|
@ -50,7 +50,7 @@ use App\Services\LabelSystem\BarcodeScanner\EIGP114BarcodeScanResult;
|
|||
use App\Services\LabelSystem\BarcodeScanner\LocalBarcodeScanResult;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class BarcodeScanHelperTest extends WebTestCase
|
||||
final class BarcodeScanHelperTest extends WebTestCase
|
||||
{
|
||||
private ?BarcodeScanHelper $service = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace App\Tests\Services\LabelSystem\BarcodeScanner;
|
|||
use App\Services\LabelSystem\BarcodeScanner\EIGP114BarcodeScanResult;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class EIGP114BarcodeScanResultTest extends TestCase
|
||||
final class EIGP114BarcodeScanResultTest extends TestCase
|
||||
{
|
||||
|
||||
public function testGuessBarcodeVendor(): void
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ use App\Entity\Parts\StorageLocation;
|
|||
use App\Services\LabelSystem\Barcodes\BarcodeContentGenerator;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
|
||||
class BarcodeContentGeneratorTest extends KernelTestCase
|
||||
final class BarcodeContentGeneratorTest extends KernelTestCase
|
||||
{
|
||||
private ?object $service = null;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use App\Services\LabelSystem\Barcodes\BarcodeHelper;
|
|||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class BarcodeHelperTest extends WebTestCase
|
||||
final class BarcodeHelperTest extends WebTestCase
|
||||
{
|
||||
|
||||
protected ?BarcodeHelper $service = null;
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ use App\Entity\Parts\StorageLocation;
|
|||
use App\Services\LabelSystem\LabelGenerator;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class LabelGeneratorTest extends WebTestCase
|
||||
final class LabelGeneratorTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @var LabelGenerator
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ use App\Entity\Parts\PartLot;
|
|||
use App\Services\LabelSystem\LabelTextReplacer;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class LabelTextReplacerTest extends WebTestCase
|
||||
final class LabelTextReplacerTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @var LabelTextReplacer
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ use App\Entity\Base\AbstractDBElement;
|
|||
use App\Services\LabelSystem\PlaceholderProviders\AbstractDBElementProvider;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class AbstractElementProviderTest extends WebTestCase
|
||||
final class AbstractElementProviderTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @var AbstractDBElementProvider
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ use App\Entity\Parts\Part;
|
|||
use App\Services\LabelSystem\PlaceholderProviders\GlobalProviders;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class GlobalProvidersTest extends WebTestCase
|
||||
final class GlobalProvidersTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @var GlobalProviders
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ use App\Entity\Contracts\NamedElementInterface;
|
|||
use App\Services\LabelSystem\PlaceholderProviders\NamedElementProvider;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class NamedElementProviderTest extends WebTestCase
|
||||
final class NamedElementProviderTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @var NamedElementProvider
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ use App\Entity\UserSystem\User;
|
|||
use App\Services\LabelSystem\PlaceholderProviders\PartLotProvider;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class PartLotProviderTest extends WebTestCase
|
||||
final class PartLotProviderTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @var PartLotProvider
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
|||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
#[Group('DB')]
|
||||
class PartProviderTest extends WebTestCase
|
||||
final class PartProviderTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @var PartProvider
|
||||
|
|
@ -62,20 +62,15 @@ class PartProviderTest extends WebTestCase
|
|||
|
||||
protected Part $target;
|
||||
|
||||
/**
|
||||
* @var EntityManager
|
||||
*/
|
||||
protected $em;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->service = self::getContainer()->get(PartProvider::class);
|
||||
$this->target = new Part();
|
||||
$this->em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
$em = self::getContainer()->get(EntityManagerInterface::class);
|
||||
|
||||
$this->target->setCategory($this->em->find(Category::class, 6));
|
||||
$this->target->setFootprint($this->em->find(Footprint::class, 6));
|
||||
$this->target->setCategory($em->find(Category::class, 6));
|
||||
$this->target->setFootprint($em->find(Footprint::class, 6));
|
||||
$this->target->setManufacturer(null);
|
||||
|
||||
$this->target->setMass(1234.2);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ use App\Services\LabelSystem\PlaceholderProviders\TimestampableElementProvider;
|
|||
use DateTime;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
class TimestampableElementProviderTest extends WebTestCase
|
||||
final class TimestampableElementProviderTest extends WebTestCase
|
||||
{
|
||||
/**
|
||||
* @var GlobalProviders
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ use App\Services\LabelSystem\SandboxedTwigFactory;
|
|||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
use Twig\Sandbox\SecurityError;
|
||||
|
||||
class SandboxedTwigFactoryTest extends WebTestCase
|
||||
final class SandboxedTwigFactoryTest extends WebTestCase
|
||||
{
|
||||
private ?SandboxedTwigFactory $service = null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue