From a964cc5eae3b37edca8331b5bc5810e9b5ee73b7 Mon Sep 17 00:00:00 2001 From: Andreas Schempp Date: Wed, 22 May 2024 11:31:41 +0200 Subject: [PATCH] Fixed tests and CI --- .github/workflows/ci.yml | 4 +++- tests/ContaoTestCase.php | 10 ++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1036497..9ca302b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,9 @@ name: CI on: - push: ~ + push: + branches: + - main pull_request: ~ # schedule: # - cron: 0 13 * * MON,THU diff --git a/tests/ContaoTestCase.php b/tests/ContaoTestCase.php index 793728b..9eebf33 100644 --- a/tests/ContaoTestCase.php +++ b/tests/ContaoTestCase.php @@ -40,7 +40,10 @@ protected function query(string $statement): int return (int) $connection->lastInsertId(); } - protected function createRootPage(string $dns = '', string $language = '', bool $fallback = true, int $languageRoot = 0, bool $published = true): PageModel + /** + * @param int|string $languageRoot + */ + protected function createRootPage(string $dns = '', string $language = '', bool $fallback = true, $languageRoot = 0, bool $published = true): PageModel { $pageModel = new PageModel(); $pageModel->type = 'root'; @@ -56,7 +59,10 @@ protected function createRootPage(string $dns = '', string $language = '', bool return $pageModel; } - protected function createPage(int $pid = 0, int $languageMain = 0, bool $published = true): PageModel + /** + * @param int|string $pid + */ + protected function createPage($pid = 0, int $languageMain = 0, bool $published = true): PageModel { $pageModel = new PageModel(); $pageModel->pid = $pid;