diff --git a/.github/workflows/test-application.yaml b/.github/workflows/test-application.yaml index aac0865..8c87214 100644 --- a/.github/workflows/test-application.yaml +++ b/.github/workflows/test-application.yaml @@ -12,7 +12,7 @@ on: jobs: test: name: '${{ matrix.php-version }} ${{ matrix.dependencies }}, Storage ${{ matrix.storage }}, Coverage ${{ matrix.coverage }}' - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 env: COVERAGE: ${{ matrix.coverage }} STORAGE: ${{ matrix.storage }} @@ -77,7 +77,8 @@ jobs: - name: Doctrine if: matrix.storage == 'doctrine' run: | - tests/app/console doctrine:database:create + mkdir -p tests/app/data + touch tests/app/data/database.sqlite tests/app/console doctrine:schema:create - name: Execute test diff --git a/composer.json b/composer.json index 3be6c20..5495911 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,8 @@ "doctrine/data-fixtures": "^1.3.3", "phpunit/phpunit": "^9.6.5 || ^10", "phpspec/prophecy": "^1.14", - "phpspec/prophecy-phpunit": "^2.0" + "phpspec/prophecy-phpunit": "^2.0", + "symfony/var-exporter": "^5.4 || ^6.4 || ^7.0" }, "autoload": { "psr-4": { diff --git a/tests/Functional/Command/ScheduleTaskCommandTest.php b/tests/Functional/Command/ScheduleTaskCommandTest.php index e6d0995..3ac55f4 100644 --- a/tests/Functional/Command/ScheduleTaskCommandTest.php +++ b/tests/Functional/Command/ScheduleTaskCommandTest.php @@ -28,12 +28,12 @@ public function testExecute() ] ); - $tasks = $this->taskRepository->findAll(); + $tasks = $this->taskRepository->findAllPaginated(1); $this->assertCount(1, $tasks); $this->assertEquals(TestHandler::class, $tasks[0]->getHandlerClass()); - $executions = $this->taskExecutionRepository->findAll(); + $executions = $this->taskExecutionRepository->findAllPaginated(1); $this->assertCount(1, $executions); $this->assertEquals(TestHandler::class, $executions[0]->getHandlerClass()); @@ -49,7 +49,7 @@ public function testExecuteWithWorkload() ] ); - $tasks = $this->taskRepository->findAll(); + $tasks = $this->taskRepository->findAllPaginated(1); $this->assertCount(1, $tasks); $this->assertEquals(TestHandler::class, $tasks[0]->getHandlerClass()); @@ -67,7 +67,7 @@ public function testExecuteWithWorkloadAndInterval() ] ); - $tasks = $this->taskRepository->findAll(); + $tasks = $this->taskRepository->findAllPaginated(1); $this->assertCount(1, $tasks); $this->assertEquals(TestHandler::class, $tasks[0]->getHandlerClass()); @@ -88,7 +88,7 @@ public function testExecuteWithWorkloadAndIntervalAndEndDate() ] ); - $tasks = $this->taskRepository->findAll(); + $tasks = $this->taskRepository->findAllPaginated(1); $this->assertCount(1, $tasks); $this->assertEquals(TestHandler::class, $tasks[0]->getHandlerClass()); @@ -109,13 +109,13 @@ public function testExecuteWithExecutionDate() ] ); - $tasks = $this->taskRepository->findAll(); + $tasks = $this->taskRepository->findAllPaginated(1); $this->assertCount(1, $tasks); $this->assertEquals(TestHandler::class, $tasks[0]->getHandlerClass()); $this->assertGreaterThanOrEqual($date, $tasks[0]->getFirstExecution()); - $executions = $this->taskExecutionRepository->findAll(); + $executions = $this->taskExecutionRepository->findAllPaginated(1); $this->assertCount(1, $executions); $this->assertEquals(TestHandler::class, $executions[0]->getHandlerClass()); diff --git a/tests/Functional/Entity/TaskExecutionRepositoryTest.php b/tests/Functional/Entity/TaskExecutionRepositoryTest.php index 0a94fa2..b4012e8 100644 --- a/tests/Functional/Entity/TaskExecutionRepositoryTest.php +++ b/tests/Functional/Entity/TaskExecutionRepositoryTest.php @@ -65,7 +65,7 @@ public function testFindAll() $executions[$execution->getUuid()] = $execution; } - $result = $this->taskExecutionRepository->findAll(); + $result = $this->taskExecutionRepository->findAllPaginated(1); $this->assertCount(3, $result); foreach ($result as $item) {