From 183d4895d01a735a264c7f2fd9e79b228401153e 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 | 11 +++++++++-- 2 files changed, 12 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..bca0e2b 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,11 @@ 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 + * @param int|string $languageMain + */ + protected function createPage($pid = 0, $languageMain = 0, bool $published = true): PageModel { $pageModel = new PageModel(); $pageModel->pid = $pid;