mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-16 05:14:35 +02:00
Fixed coding style.
This commit is contained in:
parent
e9493e52ec
commit
f5d685dfd4
71 changed files with 619 additions and 531 deletions
|
@ -1,4 +1,7 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
|
||||
*
|
||||
|
@ -23,16 +26,16 @@ namespace App\Tests\Services\LabelSystem;
|
|||
use App\Entity\LabelSystem\LabelOptions;
|
||||
use App\Entity\Parts\Part;
|
||||
use App\Services\LabelSystem\BarcodeGenerator;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
|
||||
final class BarcodeGeneratorTest extends WebTestCase
|
||||
{
|
||||
|
||||
/** @var BarcodeGenerator */
|
||||
/**
|
||||
* @var BarcodeGenerator
|
||||
*/
|
||||
protected $services;
|
||||
|
||||
public function setUp(): void
|
||||
protected function setUp(): void
|
||||
{
|
||||
self::bootKernel();
|
||||
$this->services = self::$container->get(BarcodeGenerator::class);
|
||||
|
@ -50,7 +53,7 @@ final class BarcodeGeneratorTest extends WebTestCase
|
|||
$content = $this->services->generateSVG($options, $part);
|
||||
|
||||
//When type is none, service must return null.
|
||||
if ($type === 'none') {
|
||||
if ('none' === $type) {
|
||||
$this->assertNull($content);
|
||||
} else {
|
||||
$this->assertIsString($content);
|
||||
|
@ -70,10 +73,10 @@ final class BarcodeGeneratorTest extends WebTestCase
|
|||
$svg = $this->services->generateSVG($options, $part);
|
||||
|
||||
//When type is none, service must return null.
|
||||
if ($type === "none") {
|
||||
if ('none' === $type) {
|
||||
$this->assertNull($svg);
|
||||
} else {
|
||||
$this->assertStringContainsStringIgnoringCase("SVG", $svg);
|
||||
$this->assertStringContainsStringIgnoringCase('SVG', $svg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue