diff --git a/src/Controller/TestController.php b/src/Controller/TestController.php index d0969c956..1cea5173c 100644 --- a/src/Controller/TestController.php +++ b/src/Controller/TestController.php @@ -26,7 +26,7 @@ use App\Enums\Importance; use App\Enums\MessagePosition; use App\Enums\StrengthLevel; -use App\Enums\TableView; +use App\Form\Admin\CustomerParameterType; use App\Form\Type\AlphaCaptchaType; use App\Form\Type\CaptchaImageType; use App\Form\Type\ReCaptchaType; @@ -37,7 +37,6 @@ use App\Interfaces\UserInterface; use App\Model\HttpClientError; use App\Parameter\ApplicationParameters; -use App\Parameter\UserParameters; use App\Pdf\Events\PdfLabelTextEvent; use App\Pdf\Interfaces\PdfLabelTextListenerInterface; use App\Pdf\PdfLabelDocument; @@ -503,53 +502,19 @@ public function swiss(Request $request, SwissPostService $service): JsonResponse return $this->json($data); } - #[Get(path: '/parameter', name: 'parameter')] - public function testParameter(ApplicationParameters $application, UserParameters $user): Response + #[GetPost(path: '/parameter', name: 'parameter')] + public function testParameter(Request $request, ApplicationParameters $application): Response { - $application->getDate() - ->setUpdateCalculations() - ->setImport(); - - $application->getCustomer() - ->setFax('fake'); - - $application->getDisplay() - ->setDisplayMode(TableView::CUSTOM); - - $application->getHomePage() - ->setCalculations(8); - - $application->getProduct(); - $application->getDefault(); - - $application->getSecurity() - ->setCaptcha(true) - ->setLevel(StrengthLevel::MEDIUM); - - $user->getHomePage() - ->setCalculations(7); - $user->getOption() - ->setPrintAddress(true); - - $applicationSaved = $application->save(); - $userSaved = $user->save(); - - return $this->json([ - 'application_saved' => $applicationSaved, - 'user_saved' => $userSaved, - - 'application_display' => $application->getDisplay(), - 'user_display' => $user->getDisplay(), - - 'application_home_page' => $application->getHomePage(), - 'user_home_page' => $user->getHomePage(), - - 'application_option' => $application->getOption(), - 'user_option' => $user->getOption(), + $form = $this->createForm(CustomerParameterType::class, $application->getCustomer()); + if ($this->handleRequestForm($request, $form)) { + if ($application->save()) { + return $this->redirectToHomePage($this->trans('parameters.success')); + } + // return $this->redirectToHomePage(); + } - 'date' => $application->getDate(), - 'customer' => $application->getCustomer(), - 'security' => $application->getSecurity(), + return $this->render('test/parameter.html.twig', [ + 'form' => $form, ]); } diff --git a/src/Form/Admin/CustomerParameterType.php b/src/Form/Admin/CustomerParameterType.php new file mode 100644 index 000000000..a3cf39809 --- /dev/null +++ b/src/Form/Admin/CustomerParameterType.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace App\Form\Admin; + +use App\Form\AbstractHelperType; +use App\Form\FormHelper; + +class CustomerParameterType extends AbstractHelperType +{ + public function __construct() + { + } + + public function getBlockPrefix(): string + { + return 'customer'; + } + + protected function addFormFields(FormHelper $helper): void + { + $helper->field('name') + ->updateOption('prepend_icon', 'fa-solid fa-user-group') + ->addTextType(); + $helper->field('address') + ->updateOption('prepend_icon', 'fa-solid fa-location-dot') + ->notRequired() + ->addTextType(); + $helper->field('zipCity') + ->updateOption('prepend_icon', 'fa-solid fa-map-location-dot') + ->notRequired() + ->addTextType(); + $helper->field('phone') + ->updateOption('prepend_title', 'parameters.fields.customer_phone_title') + ->notRequired() + ->addTelType(); + $helper->field('fax') + ->notRequired() + ->addFaxType(); + $helper->field('email') + ->updateOption('prepend_title', 'parameters.fields.customer_email_title') + ->notRequired() + ->addEmailType(); + $helper->field('url') + ->updateOption('prepend_title', 'parameters.fields.customer_url_title') + ->notRequired() + ->addUrlType(); + } + + protected function getLabelPrefix(): ?string + { + return 'parameters.fields.customer_'; + } +} diff --git a/src/Form/Parameters/OptionParameterType.php b/src/Form/Parameters/OptionParameterType.php new file mode 100644 index 000000000..b6e6c13ab --- /dev/null +++ b/src/Form/Parameters/OptionParameterType.php @@ -0,0 +1,38 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +declare(strict_types=1); + +namespace App\Form\Parameters; + +use App\Form\AbstractHelperType; +use App\Form\FormHelper; + +class OptionParameterType extends AbstractHelperType +{ + public function getBlockPrefix(): string + { + return 'option'; + } + + protected function addFormFields(FormHelper $helper): void + { + $helper->field('printAddress') + // ->updateAttribute('data-default', $this->getDefaultValue('printAddress')) + ->help('parameters.helps.qr_code') + ->addCheckboxType(); + + $helper->field('qrCode') + // ->updateAttribute('data-default', $this->getDefaultValue('qrCode')) + ->help('parameters.helps.print_address') + ->addCheckboxType(); + } +} diff --git a/src/Reader/CSVReader.php b/src/Reader/CSVReader.php index 805cb8923..37ded1971 100644 --- a/src/Reader/CSVReader.php +++ b/src/Reader/CSVReader.php @@ -58,6 +58,7 @@ protected function getNextData($stream): ?array { $data = \fgetcsv($stream, $this->length, $this->separator, $this->enclosure, $this->escape); + /** @phpstan-var list|null */ return \is_array($data) ? $data : null; } } diff --git a/templates/test/parameter.html.twig b/templates/test/parameter.html.twig new file mode 100644 index 000000000..48bfc923d --- /dev/null +++ b/templates/test/parameter.html.twig @@ -0,0 +1,9 @@ +{% extends 'cards/card_edit.html.twig' %} +{%- set title = 'parameters.title' -%} +{%- set title_icon = 'cogs' -%} +{%- set title_description = 'parameters.description' -%} +{# javascript #} +{% block javascripts -%} + {{ parent() }} + {{- asset_js('js/application/validation_edit.js') }} +{% endblock %} diff --git a/tests/Command/FontAwesomeCommandTest.php b/tests/Command/FontAwesomeCommandTest.php index 75d2a9479..c3460ef11 100644 --- a/tests/Command/FontAwesomeCommandTest.php +++ b/tests/Command/FontAwesomeCommandTest.php @@ -22,7 +22,7 @@ class FontAwesomeCommandTest extends CommandTestCase public function testInvalidJson(): void { - $input = ['source' => 'tests/data/json/fontawesome_invalid.json']; + $input = ['source' => 'tests/files/json/fontawesome_invalid.json']; $output = $this->execute( name: self::COMMAND_NAME, input: $input, @@ -35,7 +35,7 @@ public function testRawEmpty(): void { try { $input = [ - 'source' => 'tests/data/json/fontawesome_raw_empty.json', + 'source' => 'tests/files/json/fontawesome_raw_empty.json', 'target' => '/tests/Command/temp', ]; $output = $this->execute( @@ -52,7 +52,7 @@ public function testSimulate(): void { try { $input = [ - 'source' => 'tests/data/json/fontawesome_valid.json', + 'source' => 'tests/files/json/fontawesome_valid.json', 'target' => '/tests/Command/temp', '--dry-run' => true, ]; @@ -68,7 +68,7 @@ public function testSimulate(): void public function testSourceEmpty(): void { - $input = ['source' => 'tests/data/json/fontawesome_empty.json']; + $input = ['source' => 'tests/files/json/fontawesome_empty.json']; $output = $this->execute( name: self::COMMAND_NAME, input: $input, @@ -91,7 +91,7 @@ public function testSuccess(): void { try { $input = [ - 'source' => 'tests/data/json/fontawesome_valid.json', + 'source' => 'tests/files/json/fontawesome_valid.json', 'target' => '/tests/Command/temp', ]; $output = $this->execute( diff --git a/tests/Command/HeaderNameCommandTest.php b/tests/Command/HeaderNameCommandTest.php index 35089146c..625ed2bb4 100644 --- a/tests/Command/HeaderNameCommandTest.php +++ b/tests/Command/HeaderNameCommandTest.php @@ -18,7 +18,7 @@ class HeaderNameCommandTest extends CommandTestCase { private const COMMAND_NAME = 'app:header:name'; - private const DATA_PATH = '/tests/data/css'; + private const DATA_PATH = '/tests/files/css'; protected function setUp(): void { @@ -127,8 +127,8 @@ public function testSetContent(): void self::DATA_PATH, 'Skipped 2', 'Updated 2', - 'tests/data/css/no_header.css', - 'tests/data/css/old_header.css', + 'tests/files/css/no_header.css', + 'tests/files/css/old_header.css', ]; $input = [ '--pattern' => 'css', @@ -141,11 +141,11 @@ public function testSetContent(): void private function replaceCssContents(): void { - $file = __DIR__ . '/../data/css/no_header.css'; + $file = __DIR__ . '/../files/css/no_header.css'; if (\file_exists($file)) { \file_put_contents($file, "html {\n width: 100vw;\n}\n"); } - $file = __DIR__ . '/../data/css/old_header.css'; + $file = __DIR__ . '/../files/css/old_header.css'; if (\file_exists($file)) { \file_put_contents($file, "/* old_header.css */\nhtml {\n width: 100vw;\n}\n"); } diff --git a/tests/Command/WebpCommandTest.php b/tests/Command/WebpCommandTest.php index 1c54015bb..b588fd6c2 100644 --- a/tests/Command/WebpCommandTest.php +++ b/tests/Command/WebpCommandTest.php @@ -39,7 +39,7 @@ public function testExecuteDrySuccess(): void 'Skip: 0', ]; $input = [ - 'source' => '/tests/data/public/images/users', + 'source' => '/tests/files/public/images/users', '--dry-run' => true, ]; $output = $this->execute(self::COMMAND_NAME, $input); @@ -51,7 +51,7 @@ public function testExecuteImageInvalid(): void $name = 'example_invalid.png'; $path = FileUtils::tempDir(__DIR__); self::assertIsString($path); - $source = FileUtils::buildPath(__DIR__, '/../data/images', $name); + $source = FileUtils::buildPath(__DIR__, '/../files/images', $name); $target = FileUtils::buildPath($path, $name); self::assertTrue(FileUtils::copy($source, $target)); $source = FileUtils::makePathRelative($path, __DIR__ . '/../..'); @@ -121,7 +121,7 @@ public function testExecuteSuccess(): void $name = 'example.png'; $path = FileUtils::tempDir(__DIR__); self::assertIsString($path); - $source = FileUtils::buildPath(__DIR__, '/../data/images', $name); + $source = FileUtils::buildPath(__DIR__, '/../files/images', $name); $target = FileUtils::buildPath($path, $name); self::assertTrue(FileUtils::copy($source, $target)); $source = FileUtils::makePathRelative($path, __DIR__ . '/../..'); diff --git a/tests/Controller/AboutSymfonyControllerTest.php b/tests/Controller/AboutSymfonyControllerTest.php index c3516ac4b..bbb773c95 100644 --- a/tests/Controller/AboutSymfonyControllerTest.php +++ b/tests/Controller/AboutSymfonyControllerTest.php @@ -36,7 +36,7 @@ public static function getRoutes(): \Iterator $query = '/about/symfony/license?file=fake'; yield [$query, self::ROLE_ADMIN, Response::HTTP_OK, Request::METHOD_GET, true]; - $query = '/about/symfony/license?file=tests/data/txt/empty.txt'; + $query = '/about/symfony/license?file=tests/files/txt/empty.txt'; yield [$query, self::ROLE_ADMIN, Response::HTTP_OK, Request::METHOD_GET, true]; } } diff --git a/tests/Controller/HelpControllerTest.php b/tests/Controller/HelpControllerTest.php index 8432450a5..2cb9eaf98 100644 --- a/tests/Controller/HelpControllerTest.php +++ b/tests/Controller/HelpControllerTest.php @@ -154,7 +154,7 @@ private function checkUrl(string $url): void private function getDownloadImage(): string { - $path = __DIR__ . '/../data/images/example.png'; + $path = __DIR__ . '/../files/images/example.png'; $type = \mime_content_type($path); $data = (string) \file_get_contents($path); $encoded = \base64_encode($data); diff --git a/tests/Controller/OpenWeatherControllerTest.php b/tests/Controller/OpenWeatherControllerTest.php index cb9fde8a6..a9b7cfbe1 100644 --- a/tests/Controller/OpenWeatherControllerTest.php +++ b/tests/Controller/OpenWeatherControllerTest.php @@ -329,7 +329,7 @@ private function getImportFile(): string self::assertIsString($targetFile); self::assertFileExists($targetFile); - $originFile = __DIR__ . '/../data/city/list.invalid.json.gz'; + $originFile = __DIR__ . '/../files/city/list.invalid.json.gz'; self::assertFileExists($originFile); FileUtils::copy($originFile, $targetFile, true); diff --git a/tests/Data/css/header.css b/tests/Data/css/header.css deleted file mode 100644 index f5bc15fcc..000000000 --- a/tests/Data/css/header.css +++ /dev/null @@ -1,4 +0,0 @@ -/* tests/data/css/header.css */ -html { - width: 100vw; -} diff --git a/tests/Enums/ImageExtensionTest.php b/tests/Enums/ImageExtensionTest.php index ea241d7ab..a037b7c0b 100644 --- a/tests/Enums/ImageExtensionTest.php +++ b/tests/Enums/ImageExtensionTest.php @@ -23,7 +23,7 @@ class ImageExtensionTest extends TestCase { public static function getCreateImages(): \Iterator { - $dir = \realpath(__DIR__ . '/../data/images'); + $dir = \realpath(__DIR__ . '/../files/images'); yield [ImageExtension::BMP, $dir . '/example.bmp']; yield [ImageExtension::GIF, $dir . '/example.gif']; yield [ImageExtension::JPEG, $dir . '/example.jpeg']; diff --git a/tests/Fixture/Database.php b/tests/Fixture/Database.php index 889b10816..cd82d9c1f 100644 --- a/tests/Fixture/Database.php +++ b/tests/Fixture/Database.php @@ -120,7 +120,7 @@ public function search(string $query, string $value, int $limit, int $mode = \SQ protected function createSchema(): void { // load script - $file = __DIR__ . '/../data/sql/db_test.sql'; + $file = __DIR__ . '/../files/sql/db_test.sql'; $sql = FileUtils::readFile($file); if ('' === $sql) { throw new \LogicException('Unable to find the schema.'); diff --git a/tests/Form/Type/SimpleEditorTypeTest.php b/tests/Form/Type/SimpleEditorTypeTest.php index 790d909dd..e1bf7f870 100644 --- a/tests/Form/Type/SimpleEditorTypeTest.php +++ b/tests/Form/Type/SimpleEditorTypeTest.php @@ -38,7 +38,7 @@ public function testFormView(): void */ public function testInvalidJson(): void { - $actionsPath = __DIR__ . '/../../data/json/fontawesome_invalid.json'; + $actionsPath = __DIR__ . '/../../files/json/fontawesome_invalid.json'; $resolver = new OptionsResolver(); $view = $this->createMock(FormView::class); @@ -70,7 +70,7 @@ public function testSubmit(): void protected function getPreloadedExtensions(): array { - $actionsPath = __DIR__ . '/../../../resources/data/simple_editor_actions.json'; + $actionsPath = __DIR__ . '/../../../resources/files/simple_editor_actions.json'; return [new SimpleEditorType($actionsPath)]; } diff --git a/tests/Listener/VichListenerTest.php b/tests/Listener/VichListenerTest.php index bd1700427..9bc697cad 100644 --- a/tests/Listener/VichListenerTest.php +++ b/tests/Listener/VichListenerTest.php @@ -210,7 +210,7 @@ private function createUser(?UploadedFile $file = null): User private function getImagesPath(): string { - return __DIR__ . '/../data/images/'; + return __DIR__ . '/../files/images/'; } /** diff --git a/tests/Model/ImageDataTest.php b/tests/Model/ImageDataTest.php index 1cd952e5c..e3c32eb7e 100644 --- a/tests/Model/ImageDataTest.php +++ b/tests/Model/ImageDataTest.php @@ -20,7 +20,7 @@ class ImageDataTest extends TestCase { public function testValidData(): void { - $path = __DIR__ . '/../data/images/example.png'; + $path = __DIR__ . '/../files/images/example.png'; $content = \file_get_contents($path); self::assertIsString($content); $imageData = ImageData::instance($content); diff --git a/tests/Pdf/PdfFontAwesomeCellTest.php b/tests/Pdf/PdfFontAwesomeCellTest.php index 09705452e..b668e266d 100644 --- a/tests/Pdf/PdfFontAwesomeCellTest.php +++ b/tests/Pdf/PdfFontAwesomeCellTest.php @@ -81,7 +81,7 @@ private function getDocument(): PdfImageDocument private function getImage(): FontAwesomeImage { - $path = __DIR__ . '/../data/images/example.png'; + $path = __DIR__ . '/../files/images/example.png'; $content = \file_get_contents($path); self::assertIsString($content); diff --git a/tests/Pdf/PdfTableTest.php b/tests/Pdf/PdfTableTest.php index 6c95c4061..c07bf714f 100644 --- a/tests/Pdf/PdfTableTest.php +++ b/tests/Pdf/PdfTableTest.php @@ -196,7 +196,7 @@ public function testCellFontSizeAndIndent(): void public function testCellImage(): void { - $path = __DIR__ . '/../data/images/example.png'; + $path = __DIR__ . '/../files/images/example.png'; if (!\file_exists($path)) { self::fail('Unable to find image.'); } @@ -322,7 +322,7 @@ public function testImageCellInvalid(): void public function testImageCellValid(): void { - $path = __DIR__ . '/../data/images/example.png'; + $path = __DIR__ . '/../files/images/example.png'; $table = $this->createTable() ->addColumn(new PdfColumn()); @@ -351,7 +351,7 @@ public function testImageCellValid(): void public function testImageCellWithLongText(): void { - $path = __DIR__ . '/../data/images/example.png'; + $path = __DIR__ . '/../files/images/example.png'; $column = PdfColumn::left(width: 25.0, fixed: true); $table = $this->createTable(false) ->addColumn($column); diff --git a/tests/Pdf/Traits/PdfMemoryImageTraitTest.php b/tests/Pdf/Traits/PdfMemoryImageTraitTest.php index 023647b16..5fe026ab8 100644 --- a/tests/Pdf/Traits/PdfMemoryImageTraitTest.php +++ b/tests/Pdf/Traits/PdfMemoryImageTraitTest.php @@ -137,6 +137,6 @@ private function createGdImage(): \GdImage private function getImagePath(string $extension): string { - return \sprintf('%s/../../data/images/example.%s', __DIR__, $extension); + return \sprintf('%s/../../files/images/example.%s', __DIR__, $extension); } } diff --git a/tests/Reader/AbstractReaderTest.php b/tests/Reader/AbstractReaderTest.php index 9f04ae35e..2f5a905ed 100644 --- a/tests/Reader/AbstractReaderTest.php +++ b/tests/Reader/AbstractReaderTest.php @@ -62,7 +62,7 @@ private function getResourceReader(): AbstractReader public function __construct() { /** @psalm-var resource $resource */ - $resource = \fopen(__DIR__ . '/../data/csv/data.csv', 'r'); + $resource = \fopen(__DIR__ . '/../files/csv/data.csv', 'r'); parent::__construct($resource); } @@ -83,7 +83,7 @@ private function getSplFileInfoReader(): AbstractReader return new class() extends AbstractReader { public function __construct() { - $file = new \SplFileInfo(__DIR__ . '/../data/csv/data.csv'); + $file = new \SplFileInfo(__DIR__ . '/../files/csv/data.csv'); parent::__construct($file); } @@ -106,7 +106,7 @@ private function getStringReader(): AbstractReader public function __construct() { - $file = __DIR__ . '/../data/csv/data.csv'; + $file = __DIR__ . '/../files/csv/data.csv'; parent::__construct($file); } diff --git a/tests/Reader/CSVReaderTest.php b/tests/Reader/CSVReaderTest.php index 885b3eb05..f15805d33 100644 --- a/tests/Reader/CSVReaderTest.php +++ b/tests/Reader/CSVReaderTest.php @@ -63,7 +63,7 @@ public function testLines(): void private function getFileName(): string { - return __DIR__ . '/../data/csv/data.csv'; + return __DIR__ . '/../files/csv/data.csv'; } private function getReader(): CSVReader diff --git a/tests/Reader/ReverseReaderTest.php b/tests/Reader/ReverseReaderTest.php index 74108a92a..3d325f545 100644 --- a/tests/Reader/ReverseReaderTest.php +++ b/tests/Reader/ReverseReaderTest.php @@ -46,7 +46,7 @@ public function testLines(): void private function getFileName(): string { - return __DIR__ . '/../data/txt/reverse_reader.txt'; + return __DIR__ . '/../files/txt/reverse_reader.txt'; } private function getReader(): ReverseReader diff --git a/tests/Report/FontAwesomeReportTest.php b/tests/Report/FontAwesomeReportTest.php index 7a0ab0edb..874466eef 100644 --- a/tests/Report/FontAwesomeReportTest.php +++ b/tests/Report/FontAwesomeReportTest.php @@ -121,6 +121,6 @@ private function createImage(): FontAwesomeImage private function getSvgDirectory(): string { - return __DIR__ . '/../data/images'; + return __DIR__ . '/../files/images'; } } diff --git a/tests/Report/LogsReportTest.php b/tests/Report/LogsReportTest.php index 4475c86ba..6194dd42a 100644 --- a/tests/Report/LogsReportTest.php +++ b/tests/Report/LogsReportTest.php @@ -93,7 +93,7 @@ public function testRender(): void private function getImage(): FontAwesomeImage { - $path = __DIR__ . '/../data/images/example.png'; + $path = __DIR__ . '/../files/images/example.png'; $content = \file_get_contents($path); self::assertIsString($content); diff --git a/tests/Report/MemoryImageReportTest.php b/tests/Report/MemoryImageReportTest.php index 43727e8f2..8a1663f04 100644 --- a/tests/Report/MemoryImageReportTest.php +++ b/tests/Report/MemoryImageReportTest.php @@ -30,7 +30,7 @@ public function testEmptyImage(): void { self::expectException(PdfException::class); $controller = $this->createMock(AbstractController::class); - $image = __DIR__ . '/../data/txt/empty.txt'; + $image = __DIR__ . '/../files/txt/empty.txt'; $report = new MemoryImageReport($controller, $image); $report->render(); } @@ -52,7 +52,7 @@ public function testInvalidImage(): void public function testRender(): void { $controller = $this->createMock(AbstractController::class); - $image = __DIR__ . '/../data/images/example.png'; + $image = __DIR__ . '/../files/images/example.png'; $report = new MemoryImageReport($controller, $image); $actual = $report->render(); self::assertTrue($actual); @@ -133,7 +133,7 @@ public function testWithNoArgument(): void private function getImage(): FontAwesomeImage { - $path = __DIR__ . '/../data/images/example.png'; + $path = __DIR__ . '/../files/images/example.png'; $content = \file_get_contents($path); self::assertIsString($content); diff --git a/tests/Report/UsersReportTest.php b/tests/Report/UsersReportTest.php index f92cdafad..c2a0ee594 100644 --- a/tests/Report/UsersReportTest.php +++ b/tests/Report/UsersReportTest.php @@ -35,7 +35,7 @@ public function testRender(): void $user2 = $this->createMock(User::class); $user2->method('getImagePath') - ->willReturn(__DIR__ . '/../data/images/example.png'); + ->willReturn(__DIR__ . '/../files/images/example.png'); $report = new UsersReport($controller, [$user1, $user2], $storage); $actual = $report->render(); diff --git a/tests/Service/AssetVersionServiceTest.php b/tests/Service/AssetVersionServiceTest.php index 5c39558c8..3da6997cf 100644 --- a/tests/Service/AssetVersionServiceTest.php +++ b/tests/Service/AssetVersionServiceTest.php @@ -28,7 +28,7 @@ class AssetVersionServiceTest extends TestCase protected function setUp(): void { - $projectDir = Path::canonicalize(__DIR__ . '/../data/lock'); + $projectDir = Path::canonicalize(__DIR__ . '/../files/lock'); $imagesDir = Path::canonicalize($projectDir . '/public/images/users'); if (!\file_exists($imagesDir)) { \mkdir($imagesDir, recursive: true); diff --git a/tests/Service/DiagramServiceTest.php b/tests/Service/DiagramServiceTest.php index d8aacb034..04029c3b8 100644 --- a/tests/Service/DiagramServiceTest.php +++ b/tests/Service/DiagramServiceTest.php @@ -23,7 +23,7 @@ class DiagramServiceTest extends TestCase protected function setUp(): void { - $path = __DIR__ . '/../data/diagrams'; + $path = __DIR__ . '/../files/diagrams'; $cache = new ArrayAdapter(); $this->service = new DiagramService($path, $cache); } diff --git a/tests/Service/FontAwesomeImageServiceTest.php b/tests/Service/FontAwesomeImageServiceTest.php index fb93b3c3e..4829d35da 100644 --- a/tests/Service/FontAwesomeImageServiceTest.php +++ b/tests/Service/FontAwesomeImageServiceTest.php @@ -35,7 +35,7 @@ public function testInvalidDirectory(): void */ public function testInvalidEmptyFile(): void { - $this->checkImageIsInvalid(__DIR__ . '/../data/images', 'empty.svg'); + $this->checkImageIsInvalid(__DIR__ . '/../files/images', 'empty.svg'); } /** @@ -62,7 +62,7 @@ public function testSvgDirectory(): void */ public function testValidFileSizeEquals(): void { - $actual = $this->checkImageIsValid(__DIR__ . '/../data/images', '512x512.svg'); + $actual = $this->checkImageIsValid(__DIR__ . '/../files/images', '512x512.svg'); self::assertSame(64, $actual->getWidth()); self::assertSame(64, $actual->getHeight()); } @@ -72,7 +72,7 @@ public function testValidFileSizeEquals(): void */ public function testValidFileWidthGreater(): void { - $actual = $this->checkImageIsValid(__DIR__ . '/../data/images', '576x512.svg'); + $actual = $this->checkImageIsValid(__DIR__ . '/../files/images', '576x512.svg'); self::assertSame(64, $actual->getWidth()); self::assertSame(57, $actual->getHeight()); } @@ -82,7 +82,7 @@ public function testValidFileWidthGreater(): void */ public function testValidFileWidthSmaller(): void { - $actual = $this->checkImageIsValid(__DIR__ . '/../data/images', '448x512.svg'); + $actual = $this->checkImageIsValid(__DIR__ . '/../files/images', '448x512.svg'); self::assertSame(56, $actual->getWidth()); self::assertSame(64, $actual->getHeight()); } @@ -92,7 +92,7 @@ public function testValidFileWidthSmaller(): void */ public function testValidFileWithColor(): void { - $this->checkImageIsValid(__DIR__ . '/../data/images', '448x512.svg', 'red'); + $this->checkImageIsValid(__DIR__ . '/../files/images', '448x512.svg', 'red'); } /** @@ -100,7 +100,7 @@ public function testValidFileWithColor(): void */ public function testValidFileWithoutExtension(): void { - $this->checkImageIsValid(__DIR__ . '/../data/images', '448x512'); + $this->checkImageIsValid(__DIR__ . '/../files/images', '448x512'); } /** diff --git a/tests/Service/ImageResizerTest.php b/tests/Service/ImageResizerTest.php index bb25d7f40..8c3d7fc90 100644 --- a/tests/Service/ImageResizerTest.php +++ b/tests/Service/ImageResizerTest.php @@ -63,7 +63,7 @@ public function testResizeSmall(): void public function testResizeWidthGreaterHeight(): void { - $source = __DIR__ . '/../data/images/example.png'; + $source = __DIR__ . '/../files/images/example.png'; $target = $this->getTarget(); $actual = $this->service->resizeDefault($source, $target); self::assertTrue($actual); @@ -85,7 +85,7 @@ protected static function assertImageValid(string $target, int $width, ?int $hei private function getSource(): string { - return __DIR__ . '/../data/images/example.bmp'; + return __DIR__ . '/../files/images/example.bmp'; } private function getTarget(): string diff --git a/tests/Service/ImageServiceTest.php b/tests/Service/ImageServiceTest.php index 6d40d5c41..382e23cfb 100644 --- a/tests/Service/ImageServiceTest.php +++ b/tests/Service/ImageServiceTest.php @@ -79,7 +79,7 @@ public function testFillRectangle(): void public function testFromFile(): void { - $file = __DIR__ . '/../data/images/example.png'; + $file = __DIR__ . '/../files/images/example.png'; $service = ImageService::fromFile($file); self::assertNotNull($service); self::assertSame($file, $service->getFilename()); @@ -96,7 +96,7 @@ public function testFromFileInvalid(): void $service = ImageService::fromFile($file); self::assertNull($service); - $file = Path::normalize(__DIR__ . '/../data/images/example_invalid.png'); + $file = Path::normalize(__DIR__ . '/../files/images/example_invalid.png'); $service = ImageService::fromFile($file); self::assertNull($service); } diff --git a/tests/Service/LogServiceTest.php b/tests/Service/LogServiceTest.php index 243f2cc61..53537bc53 100644 --- a/tests/Service/LogServiceTest.php +++ b/tests/Service/LogServiceTest.php @@ -94,7 +94,7 @@ public function testParseFileInvalid(): void */ public function testParseInvalidCSV(): void { - $fileName = __DIR__ . '/../data/txt/log_invalid_csv.txt'; + $fileName = __DIR__ . '/../files/txt/log_invalid_csv.txt'; $logger = $this->createMock(LoggerInterface::class); $translator = $this->createMockTranslator(); $cache = new ArrayAdapter(); @@ -110,7 +110,7 @@ public function testParseInvalidCSV(): void */ public function testParseInvalidJSON(): void { - $fileName = __DIR__ . '/../data/txt/log_invalid_json.txt'; + $fileName = __DIR__ . '/../files/txt/log_invalid_json.txt'; $logger = $this->createMock(LoggerInterface::class); $translator = $this->createMockTranslator(); $cache = new ArrayAdapter(); diff --git a/tests/Service/MarkdownServiceTest.php b/tests/Service/MarkdownServiceTest.php index b55d675d7..0ce26d54b 100644 --- a/tests/Service/MarkdownServiceTest.php +++ b/tests/Service/MarkdownServiceTest.php @@ -60,7 +60,7 @@ public function testConvertContentWithTitle(): void */ public function testConvertFile(): void { - $path = __DIR__ . '/../data/txt/reverse_reader.txt'; + $path = __DIR__ . '/../files/txt/reverse_reader.txt'; $content = FileUtils::readFile($path); $content = StringUtils::pregReplace('/[^>]$/m', '$0 ', $content); $service = $this->createService(); diff --git a/tests/Service/OpenWeatherCityUpdaterTest.php b/tests/Service/OpenWeatherCityUpdaterTest.php index 6b0ff3276..b02ff4f51 100644 --- a/tests/Service/OpenWeatherCityUpdaterTest.php +++ b/tests/Service/OpenWeatherCityUpdaterTest.php @@ -174,7 +174,7 @@ protected static function assertInvalid(array $actual, string $message): void private function copy(string $fileName): string { - $path = FileUtils::realPath(__DIR__ . '/../Data'); + $path = FileUtils::realPath(__DIR__ . '/../files'); $originFile = FileUtils::buildPath($path, $fileName); $targetFile = FileUtils::buildPath($this->tempPath, \basename($originFile)); FileUtils::copy($originFile, $targetFile); diff --git a/tests/Service/OpenWeatherSearchServiceTest.php b/tests/Service/OpenWeatherSearchServiceTest.php index c0ec657eb..a149a416c 100644 --- a/tests/Service/OpenWeatherSearchServiceTest.php +++ b/tests/Service/OpenWeatherSearchServiceTest.php @@ -29,7 +29,7 @@ class OpenWeatherSearchServiceTest extends TestCase protected function setUp(): void { - $this->databaseName = __DIR__ . '/../data/sqlite/openweather_test.sqlite'; + $this->databaseName = __DIR__ . '/../files/sqlite/openweather_test.sqlite'; $service = new PositionService($this->createMockTranslator()); $formatter = new OpenWeatherFormatter($service); $cache = new ArrayAdapter(); diff --git a/tests/Service/PdfLabelServiceTest.php b/tests/Service/PdfLabelServiceTest.php index 887689856..d9b7aedb2 100644 --- a/tests/Service/PdfLabelServiceTest.php +++ b/tests/Service/PdfLabelServiceTest.php @@ -37,7 +37,7 @@ public function testAllWithDefaultFile(): void public function testAllWithEmptyFile(): void { - $file = __DIR__ . '/../data/txt/empty.txt'; + $file = __DIR__ . '/../files/txt/empty.txt'; self::expectException(PdfException::class); $service = $this->createService(); $service->all($file); diff --git a/tests/Service/SwissPostServiceTest.php b/tests/Service/SwissPostServiceTest.php index aeb67dbe5..613148407 100644 --- a/tests/Service/SwissPostServiceTest.php +++ b/tests/Service/SwissPostServiceTest.php @@ -23,7 +23,7 @@ class SwissPostServiceTest extends TestCase protected function setUp(): void { - $this->databaseName = __DIR__ . '/../data/sqlite/swiss_test.sqlite'; + $this->databaseName = __DIR__ . '/../files/sqlite/swiss_test.sqlite'; $this->service = new SwissPostService($this->databaseName); } diff --git a/tests/Service/SwissPostUpdaterTest.php b/tests/Service/SwissPostUpdaterTest.php index 2309468cb..ebb63d953 100644 --- a/tests/Service/SwissPostUpdaterTest.php +++ b/tests/Service/SwissPostUpdaterTest.php @@ -36,8 +36,8 @@ protected function setUp(): void { parent::setUp(); - $source = __DIR__ . '/../data/sqlite/swiss_test_empty.sqlite'; - $this->databaseName = __DIR__ . '/../data/csv/swiss_test_model.sqlite'; + $source = __DIR__ . '/../files/sqlite/swiss_test_empty.sqlite'; + $this->databaseName = __DIR__ . '/../files/csv/swiss_test_model.sqlite'; \copy($source, $this->databaseName); $this->application = $this->createMock(ApplicationService::class); @@ -69,28 +69,28 @@ public function testCreateForm(): void public function testImport2FilesInZip(): void { - $path = __DIR__ . '/../data/zip/two_files.zip'; + $path = __DIR__ . '/../files/zip/two_files.zip'; $actual = $this->service->import($path, false); self::assertFalse($actual->isValid()); } public function testImportEmptyZip(): void { - $path = __DIR__ . '/../data/zip/empty.zip'; + $path = __DIR__ . '/../files/zip/empty.zip'; $actual = $this->service->import($path, false); self::assertFalse($actual->isValid()); } public function testImportFileContentEmpty(): void { - $path = __DIR__ . '/../data/zip/small_post_address_empty.zip'; + $path = __DIR__ . '/../files/zip/small_post_address_empty.zip'; $actual = $this->service->import($path, false); self::assertFalse($actual->isValid()); } public function testImportFileEmpty(): void { - $path = __DIR__ . '/../data/txt/empty.txt'; + $path = __DIR__ . '/../files/txt/empty.txt'; $actual = $this->service->import($path, false); self::assertFalse($actual->isValid()); } @@ -133,7 +133,7 @@ public function testImportSameAsDatabase(): void public function testImportStateNoFound(): void { - $this->databaseName = __DIR__ . '/../data/sqlite/not_exist.sqlite'; + $this->databaseName = __DIR__ . '/../files/sqlite/not_exist.sqlite'; $this->application = $this->createMock(ApplicationService::class); $factory = $this->getService(FormFactoryInterface::class); $service = new SwissPostService($this->databaseName); @@ -144,7 +144,7 @@ public function testImportStateNoFound(): void $this->service->setTranslator($translator) ->setLogger($logger); - $path = __DIR__ . '/../data/zip/small_post_address.zip'; + $path = __DIR__ . '/../files/zip/small_post_address.zip'; $actual = $this->service->import($path, false); self::assertFalse($actual->isValid()); } @@ -154,7 +154,7 @@ public function testImportSuccess(): void $date = new \DateTime('2024-01-17'); $this->application->method('getLastImport') ->willReturn($date); - $path = __DIR__ . '/../data/zip/small_post_address.zip'; + $path = __DIR__ . '/../files/zip/small_post_address.zip'; $actual = $this->service->import($path, false); self::assertTrue($actual->isValid()); @@ -171,7 +171,7 @@ public function testImportSuccess(): void public function testImportSuccessOverwrite(): void { - $path = __DIR__ . '/../data/zip/small_post_address.zip'; + $path = __DIR__ . '/../files/zip/small_post_address.zip'; $actual = $this->service->import($path, true); self::assertTrue($actual->isValid()); @@ -191,7 +191,7 @@ public function testImportValidityOlder(): void $date = new \DateTime('2024-07-17'); $this->application->method('getLastImport') ->willReturn($date); - $path = __DIR__ . '/../data/zip/small_post_address.zip'; + $path = __DIR__ . '/../files/zip/small_post_address.zip'; $actual = $this->service->import($path, false); self::assertFalse($actual->isValid()); } diff --git a/tests/Spreadsheet/UsersDocumentTest.php b/tests/Spreadsheet/UsersDocumentTest.php index 27e7f6d34..33d49aebe 100644 --- a/tests/Spreadsheet/UsersDocumentTest.php +++ b/tests/Spreadsheet/UsersDocumentTest.php @@ -34,7 +34,7 @@ public function testRender(): void $user2 = $this->createMock(User::class); $user2->method('getImagePath') - ->willReturn(__DIR__ . '/../data/images/example.png'); + ->willReturn(__DIR__ . '/../files/images/example.png'); $controller = $this->createMock(AbstractController::class); $document = new UsersDocument($controller, [$user1, $user2], $storage); diff --git a/tests/Spreadsheet/WorksheetDocumentTest.php b/tests/Spreadsheet/WorksheetDocumentTest.php index d93ea6966..315db5fea 100644 --- a/tests/Spreadsheet/WorksheetDocumentTest.php +++ b/tests/Spreadsheet/WorksheetDocumentTest.php @@ -91,7 +91,7 @@ public function testSetActiveTitle(): void public function testSetCellImage(): void { - $path = __DIR__ . '/../data/images/example.png'; + $path = __DIR__ . '/../files/images/example.png'; $sheet = $this->getActiveSheet(); $sheet->setCellImage($path, 'A1', 124, 147); $actual = $sheet->getColumnDimension('A')->getWidth(); diff --git a/tests/Table/ColumnTest.php b/tests/Table/ColumnTest.php index eb6981fe9..9c3e564d9 100644 --- a/tests/Table/ColumnTest.php +++ b/tests/Table/ColumnTest.php @@ -39,7 +39,7 @@ public function testCreateColumnAction(): void public function testFromJsonEmpty(): void { self::expectException(\InvalidArgumentException::class); - $path = __DIR__ . '/../data/json/columns_empty.json'; + $path = __DIR__ . '/../files/json/columns_empty.json'; $table = $this->createTable(); Column::fromJson($table, $path); } @@ -61,7 +61,7 @@ public function testFromJsonInvalidFile(): void public function testFromJsonInvalidFormatter(): void { self::expectException(\InvalidArgumentException::class); - $path = __DIR__ . '/../data/json/columns_invalid_formatter.json'; + $path = __DIR__ . '/../files/json/columns_invalid_formatter.json'; $table = $this->createTable(); Column::fromJson($table, $path); } @@ -73,7 +73,7 @@ public function testFromJsonValid(): void { $table = $this->createTable(); - $path = __DIR__ . '/../data/json/columns_default.json'; + $path = __DIR__ . '/../files/json/columns_default.json'; $columns = Column::fromJson($table, $path); self::assertCount(4, $columns); } diff --git a/tests/Traits/ImageSizeTraitTest.php b/tests/Traits/ImageSizeTraitTest.php index 682a1baf7..357dec585 100644 --- a/tests/Traits/ImageSizeTraitTest.php +++ b/tests/Traits/ImageSizeTraitTest.php @@ -24,8 +24,8 @@ class ImageSizeTraitTest extends TestCase public static function getSizes(): \Iterator { yield ['', [0, 0]]; - yield [__DIR__ . '/../data/images/example.png', [124, 147]]; - yield [__DIR__ . '/../data/images/example.jpg', [500, 477]]; + yield [__DIR__ . '/../files/images/example.png', [124, 147]]; + yield [__DIR__ . '/../files/images/example.jpg', [500, 477]]; } #[DataProvider('getSizes')] diff --git a/tests/Utils/FileUtilsTest.php b/tests/Utils/FileUtilsTest.php index 4b09dd953..710072a2e 100644 --- a/tests/Utils/FileUtilsTest.php +++ b/tests/Utils/FileUtilsTest.php @@ -317,7 +317,7 @@ public function testTempFile(): void private static function getEmptyFile(): string { - return __DIR__ . '/../data/txt/empty.txt'; + return __DIR__ . '/../files/txt/empty.txt'; } private function getFakeFile(): string @@ -327,12 +327,12 @@ private function getFakeFile(): string private function getJsonFile(): string { - return __DIR__ . '/../data/city/list.json'; + return __DIR__ . '/../files/city/list.json'; } private static function getLinesFile(): string { - return __DIR__ . '/../data/txt/lines_count.txt'; + return __DIR__ . '/../files/txt/lines_count.txt'; } private function isLinux(): bool diff --git a/tests/data/city/list.empty.json b/tests/files/city/list.empty.json similarity index 100% rename from tests/data/city/list.empty.json rename to tests/files/city/list.empty.json diff --git a/tests/data/city/list.empty.json.gz b/tests/files/city/list.empty.json.gz similarity index 100% rename from tests/data/city/list.empty.json.gz rename to tests/files/city/list.empty.json.gz diff --git a/tests/data/city/list.invalid.json.gz b/tests/files/city/list.invalid.json.gz similarity index 100% rename from tests/data/city/list.invalid.json.gz rename to tests/files/city/list.invalid.json.gz diff --git a/tests/data/city/list.json b/tests/files/city/list.json similarity index 100% rename from tests/data/city/list.json rename to tests/files/city/list.json diff --git a/tests/data/city/list.json.gz b/tests/files/city/list.json.gz similarity index 100% rename from tests/data/city/list.json.gz rename to tests/files/city/list.json.gz diff --git a/tests/Data/css/empty.css b/tests/files/css/empty.css similarity index 100% rename from tests/Data/css/empty.css rename to tests/files/css/empty.css diff --git a/tests/files/css/header.css b/tests/files/css/header.css new file mode 100644 index 000000000..06b04c00e --- /dev/null +++ b/tests/files/css/header.css @@ -0,0 +1,4 @@ +/* tests/files/css/header.css */ +html { + width: 100vw; +} diff --git a/tests/Data/css/no_header.css b/tests/files/css/no_header.css similarity index 100% rename from tests/Data/css/no_header.css rename to tests/files/css/no_header.css diff --git a/tests/Data/css/old_header.css b/tests/files/css/old_header.css similarity index 100% rename from tests/Data/css/old_header.css rename to tests/files/css/old_header.css diff --git a/tests/Data/csv/data.csv b/tests/files/csv/data.csv similarity index 100% rename from tests/Data/csv/data.csv rename to tests/files/csv/data.csv diff --git a/tests/Data/csv/swiss_state.csv b/tests/files/csv/swiss_state.csv similarity index 100% rename from tests/Data/csv/swiss_state.csv rename to tests/files/csv/swiss_state.csv diff --git a/tests/Data/diagrams/no_title.mmd b/tests/files/diagrams/no_title.mmd similarity index 100% rename from tests/Data/diagrams/no_title.mmd rename to tests/files/diagrams/no_title.mmd diff --git a/tests/Data/diagrams/user.mmd b/tests/files/diagrams/user.mmd similarity index 100% rename from tests/Data/diagrams/user.mmd rename to tests/files/diagrams/user.mmd diff --git a/tests/Data/images/448x512.svg b/tests/files/images/448x512.svg similarity index 100% rename from tests/Data/images/448x512.svg rename to tests/files/images/448x512.svg diff --git a/tests/Data/images/512x512.svg b/tests/files/images/512x512.svg similarity index 100% rename from tests/Data/images/512x512.svg rename to tests/files/images/512x512.svg diff --git a/tests/Data/images/576x512.svg b/tests/files/images/576x512.svg similarity index 100% rename from tests/Data/images/576x512.svg rename to tests/files/images/576x512.svg diff --git a/tests/Data/images/empty.svg b/tests/files/images/empty.svg similarity index 100% rename from tests/Data/images/empty.svg rename to tests/files/images/empty.svg diff --git a/tests/Data/images/example.avif b/tests/files/images/example.avif similarity index 100% rename from tests/Data/images/example.avif rename to tests/files/images/example.avif diff --git a/tests/Data/images/example.bmp b/tests/files/images/example.bmp similarity index 100% rename from tests/Data/images/example.bmp rename to tests/files/images/example.bmp diff --git a/tests/Data/images/example.gif b/tests/files/images/example.gif similarity index 100% rename from tests/Data/images/example.gif rename to tests/files/images/example.gif diff --git a/tests/Data/images/example.jpeg b/tests/files/images/example.jpeg similarity index 100% rename from tests/Data/images/example.jpeg rename to tests/files/images/example.jpeg diff --git a/tests/Data/images/example.jpg b/tests/files/images/example.jpg similarity index 100% rename from tests/Data/images/example.jpg rename to tests/files/images/example.jpg diff --git a/tests/Data/images/example.png b/tests/files/images/example.png similarity index 100% rename from tests/Data/images/example.png rename to tests/files/images/example.png diff --git a/tests/Data/images/example.wbmp b/tests/files/images/example.wbmp similarity index 100% rename from tests/Data/images/example.wbmp rename to tests/files/images/example.wbmp diff --git a/tests/Data/images/example.webp b/tests/files/images/example.webp similarity index 100% rename from tests/Data/images/example.webp rename to tests/files/images/example.webp diff --git a/tests/Data/images/example.xbm b/tests/files/images/example.xbm similarity index 100% rename from tests/Data/images/example.xbm rename to tests/files/images/example.xbm diff --git a/tests/Data/images/example.xpm b/tests/files/images/example.xpm similarity index 100% rename from tests/Data/images/example.xpm rename to tests/files/images/example.xpm diff --git a/tests/Data/images/example_invalid.png b/tests/files/images/example_invalid.png similarity index 100% rename from tests/Data/images/example_invalid.png rename to tests/files/images/example_invalid.png diff --git a/tests/Data/images/solid/anchor.svg b/tests/files/images/solid/anchor.svg similarity index 100% rename from tests/Data/images/solid/anchor.svg rename to tests/files/images/solid/anchor.svg diff --git a/tests/Data/images/user_example.jpg b/tests/files/images/user_example.jpg similarity index 100% rename from tests/Data/images/user_example.jpg rename to tests/files/images/user_example.jpg diff --git a/tests/Data/json/columns_default.json b/tests/files/json/columns_default.json similarity index 100% rename from tests/Data/json/columns_default.json rename to tests/files/json/columns_default.json diff --git a/tests/Data/json/columns_empty.json b/tests/files/json/columns_empty.json similarity index 100% rename from tests/Data/json/columns_empty.json rename to tests/files/json/columns_empty.json diff --git a/tests/Data/json/columns_invalid_formatter.json b/tests/files/json/columns_invalid_formatter.json similarity index 100% rename from tests/Data/json/columns_invalid_formatter.json rename to tests/files/json/columns_invalid_formatter.json diff --git a/tests/Data/json/fontawesome_empty.json b/tests/files/json/fontawesome_empty.json similarity index 100% rename from tests/Data/json/fontawesome_empty.json rename to tests/files/json/fontawesome_empty.json diff --git a/tests/Data/json/fontawesome_invalid.json b/tests/files/json/fontawesome_invalid.json similarity index 100% rename from tests/Data/json/fontawesome_invalid.json rename to tests/files/json/fontawesome_invalid.json diff --git a/tests/Data/json/fontawesome_raw_empty.json b/tests/files/json/fontawesome_raw_empty.json similarity index 100% rename from tests/Data/json/fontawesome_raw_empty.json rename to tests/files/json/fontawesome_raw_empty.json diff --git a/tests/Data/json/fontawesome_valid.json b/tests/files/json/fontawesome_valid.json similarity index 100% rename from tests/Data/json/fontawesome_valid.json rename to tests/files/json/fontawesome_valid.json diff --git a/tests/Data/lock/composer.lock b/tests/files/lock/composer.lock similarity index 100% rename from tests/Data/lock/composer.lock rename to tests/files/lock/composer.lock diff --git a/tests/Data/public/images/users/example.png b/tests/files/public/images/users/example.png similarity index 100% rename from tests/Data/public/images/users/example.png rename to tests/files/public/images/users/example.png diff --git a/tests/Data/sql/db_test.sql b/tests/files/sql/db_test.sql similarity index 100% rename from tests/Data/sql/db_test.sql rename to tests/files/sql/db_test.sql diff --git a/tests/Data/sqlite/openweather_test.sqlite b/tests/files/sqlite/openweather_test.sqlite similarity index 100% rename from tests/Data/sqlite/openweather_test.sqlite rename to tests/files/sqlite/openweather_test.sqlite diff --git a/tests/Data/sqlite/swiss_test.sqlite b/tests/files/sqlite/swiss_test.sqlite similarity index 100% rename from tests/Data/sqlite/swiss_test.sqlite rename to tests/files/sqlite/swiss_test.sqlite diff --git a/tests/Data/sqlite/swiss_test_empty.sqlite b/tests/files/sqlite/swiss_test_empty.sqlite similarity index 100% rename from tests/Data/sqlite/swiss_test_empty.sqlite rename to tests/files/sqlite/swiss_test_empty.sqlite diff --git a/tests/Data/txt/empty.txt b/tests/files/txt/empty.txt similarity index 100% rename from tests/Data/txt/empty.txt rename to tests/files/txt/empty.txt diff --git a/tests/Data/txt/lines_count.txt b/tests/files/txt/lines_count.txt similarity index 100% rename from tests/Data/txt/lines_count.txt rename to tests/files/txt/lines_count.txt diff --git a/tests/Data/txt/log_invalid_csv.txt b/tests/files/txt/log_invalid_csv.txt similarity index 100% rename from tests/Data/txt/log_invalid_csv.txt rename to tests/files/txt/log_invalid_csv.txt diff --git a/tests/Data/txt/log_invalid_json.txt b/tests/files/txt/log_invalid_json.txt similarity index 100% rename from tests/Data/txt/log_invalid_json.txt rename to tests/files/txt/log_invalid_json.txt diff --git a/tests/Data/txt/reverse_reader.txt b/tests/files/txt/reverse_reader.txt similarity index 100% rename from tests/Data/txt/reverse_reader.txt rename to tests/files/txt/reverse_reader.txt diff --git a/tests/Data/zip/empty.zip b/tests/files/zip/empty.zip similarity index 100% rename from tests/Data/zip/empty.zip rename to tests/files/zip/empty.zip diff --git a/tests/Data/zip/small_post_address.zip b/tests/files/zip/small_post_address.zip similarity index 100% rename from tests/Data/zip/small_post_address.zip rename to tests/files/zip/small_post_address.zip diff --git a/tests/Data/zip/small_post_address_empty.zip b/tests/files/zip/small_post_address_empty.zip similarity index 100% rename from tests/Data/zip/small_post_address_empty.zip rename to tests/files/zip/small_post_address_empty.zip diff --git a/tests/Data/zip/two_files.zip b/tests/files/zip/two_files.zip similarity index 100% rename from tests/Data/zip/two_files.zip rename to tests/files/zip/two_files.zip diff --git a/vendor-bin/phpstan/composer.lock b/vendor-bin/phpstan/composer.lock index ecf01bf31..fc2700782 100644 --- a/vendor-bin/phpstan/composer.lock +++ b/vendor-bin/phpstan/composer.lock @@ -56,16 +56,16 @@ }, { "name": "phpstan/phpstan", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4" + "reference": "50d276fc3bf1430ec315f2f109bbde2769821524" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/46b4d3529b12178112d9008337beda0cc2a1a6b4", - "reference": "46b4d3529b12178112d9008337beda0cc2a1a6b4", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/50d276fc3bf1430ec315f2f109bbde2769821524", + "reference": "50d276fc3bf1430ec315f2f109bbde2769821524", "shasum": "" }, "require": { @@ -110,7 +110,7 @@ "type": "github" } ], - "time": "2024-11-28T22:19:37+00:00" + "time": "2024-12-17T17:14:01+00:00" }, { "name": "phpstan/phpstan-deprecation-rules", @@ -232,21 +232,21 @@ }, { "name": "phpstan/phpstan-phpunit", - "version": "2.0.1", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "4b6ad7fab8683ff4efd7887ba26ef8ee171c7475" + "reference": "2cedfb72dfd0e9c5d636f837b945c9f20c943bdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4b6ad7fab8683ff4efd7887ba26ef8ee171c7475", - "reference": "4b6ad7fab8683ff4efd7887ba26ef8ee171c7475", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/2cedfb72dfd0e9c5d636f837b945c9f20c943bdb", + "reference": "2cedfb72dfd0e9c5d636f837b945c9f20c943bdb", "shasum": "" }, "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.0" + "phpstan/phpstan": "^2.0.4" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -277,27 +277,27 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.1" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.2" }, - "time": "2024-11-12T12:48:00+00:00" + "time": "2024-12-17T17:22:26+00:00" }, { "name": "phpstan/phpstan-strict-rules", - "version": "2.0.0", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-strict-rules.git", - "reference": "a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158" + "reference": "ed6fea0ad4ad9c7e25f3ad2e7c4d420cf1e67fe3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158", - "reference": "a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158", + "url": "https://api.github.com/repos/phpstan/phpstan-strict-rules/zipball/ed6fea0ad4ad9c7e25f3ad2e7c4d420cf1e67fe3", + "reference": "ed6fea0ad4ad9c7e25f3ad2e7c4d420cf1e67fe3", "shasum": "" }, "require": { "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.0" + "phpstan/phpstan": "^2.0.4" }, "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.2", @@ -325,9 +325,9 @@ "description": "Extra strict and opinionated rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-strict-rules/issues", - "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.0" + "source": "https://github.com/phpstan/phpstan-strict-rules/tree/2.0.1" }, - "time": "2024-10-26T16:04:33+00:00" + "time": "2024-12-12T20:21:10+00:00" } ], "packages-dev": [], diff --git a/vendor-bin/rector/composer.lock b/vendor-bin/rector/composer.lock index 749f36326..5e5db4442 100644 --- a/vendor-bin/rector/composer.lock +++ b/vendor-bin/rector/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "phpstan/phpstan", - "version": "1.12.12", + "version": "1.12.13", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0" + "reference": "9b469068840cfa031e1deaf2fa1886d00e20680f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", - "reference": "b5ae1b88f471d3fd4ba1aa0046234b5ca3776dd0", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9b469068840cfa031e1deaf2fa1886d00e20680f", + "reference": "9b469068840cfa031e1deaf2fa1886d00e20680f", "shasum": "" }, "require": { @@ -62,7 +62,7 @@ "type": "github" } ], - "time": "2024-11-28T22:13:23+00:00" + "time": "2024-12-17T17:00:20+00:00" }, { "name": "rector/rector",