Refactored BarcodeRedirector logic to be more universal

This commit is contained in:
Jan Böhmer 2026-02-22 01:28:41 +01:00
parent e0345076c1
commit f45960e4be
3 changed files with 101 additions and 127 deletions

View file

@ -41,10 +41,10 @@ declare(strict_types=1);
namespace App\Tests\Services\LabelSystem\BarcodeScanner;
use App\Services\LabelSystem\BarcodeScanner\BarcodeScanResultHandler;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\Group;
use App\Entity\LabelSystem\LabelSupportedElement;
use App\Services\LabelSystem\BarcodeScanner\BarcodeRedirector;
use App\Services\LabelSystem\BarcodeScanner\BarcodeSourceType;
use App\Services\LabelSystem\BarcodeScanner\LocalBarcodeScanResult;
use Doctrine\ORM\EntityNotFoundException;
@ -55,14 +55,14 @@ use App\Services\LabelSystem\BarcodeScanner\BarcodeScanResultInterface;
use InvalidArgumentException;
final class BarcodeRedirectorTest extends KernelTestCase
final class BarcodeScanResultHandlerTest extends KernelTestCase
{
private ?BarcodeRedirector $service = null;
private ?BarcodeScanResultHandler $service = null;
protected function setUp(): void
{
self::bootKernel();
$this->service = self::getContainer()->get(BarcodeRedirector::class);
$this->service = self::getContainer()->get(BarcodeScanResultHandler::class);
}
public static function urlDataProvider(): \Iterator