From 5826ac92c869f4b24b0f7275afc7bc2060ba7c23 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 24 Feb 2023 18:59:54 +0900 Subject: [PATCH 1/3] test: debug --- .github/workflows/tests.yml | 6 +++--- Test/Case/AllCircularNoticesTest.php | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7cfa881..658371c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -3,7 +3,7 @@ on: branches: - main - master - - availability + - debug/github_action_error pull_request: branches: - main @@ -31,8 +31,8 @@ jobs: runs-on: ubuntu-18.04 strategy: matrix: - php: [ '7.1', '7.2', '7.3', '7.4' ] - mysql: [ '5.7', '8.0' ] + php: [ '7.3', '7.4' ] + mysql: [ '5.7' ] env: NC3_BUILD_DIR: "/opt/nc3" diff --git a/Test/Case/AllCircularNoticesTest.php b/Test/Case/AllCircularNoticesTest.php index 2eb94dc..19640a4 100644 --- a/Test/Case/AllCircularNoticesTest.php +++ b/Test/Case/AllCircularNoticesTest.php @@ -25,6 +25,18 @@ class AllCircularNoticesTest extends CakeTestSuite { */ public static function suite() { $plugin = preg_replace('/^All([\w]+)Test$/', '$1', __CLASS__); + + $Folder = new Folder(CakePlugin::path($plugin) . 'Test' . DS . 'Case'); + $files = $Folder->tree(null, true, 'files'); + foreach ($files as $file) { + if (preg_match('/\/All([\w]+)Test\.php$/', $file)) { + continue; + } + if (substr($file, -8) === 'Test.php') { + var_dump($file); + } + } + $suite = new CakeTestSuite(sprintf('All %s Plugin tests', $plugin)); $suite->addTestDirectoryRecursive(CakePlugin::path($plugin) . 'Test' . DS . 'Case'); return $suite; From 6c90730e15f441c73d93fcb0580b6fd77b3c3f6f Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 24 Feb 2023 19:05:06 +0900 Subject: [PATCH 2/3] test: debug --- Test/Case/AllCircularNoticesTest.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Test/Case/AllCircularNoticesTest.php b/Test/Case/AllCircularNoticesTest.php index 19640a4..02622f1 100644 --- a/Test/Case/AllCircularNoticesTest.php +++ b/Test/Case/AllCircularNoticesTest.php @@ -26,16 +26,16 @@ class AllCircularNoticesTest extends CakeTestSuite { public static function suite() { $plugin = preg_replace('/^All([\w]+)Test$/', '$1', __CLASS__); - $Folder = new Folder(CakePlugin::path($plugin) . 'Test' . DS . 'Case'); - $files = $Folder->tree(null, true, 'files'); - foreach ($files as $file) { - if (preg_match('/\/All([\w]+)Test\.php$/', $file)) { - continue; - } - if (substr($file, -8) === 'Test.php') { - var_dump($file); - } - } + $Folder = new Folder(CakePlugin::path($plugin) . 'Test' . DS . 'Case'); + $files = $Folder->tree(null, true, 'files'); + foreach ($files as $file) { + if (preg_match('/\/All([\w]+)Test\.php$/', $file)) { + continue; + } + if (substr($file, -8) === 'Test.php') { + var_dump($file); + } + } $suite = new CakeTestSuite(sprintf('All %s Plugin tests', $plugin)); $suite->addTestDirectoryRecursive(CakePlugin::path($plugin) . 'Test' . DS . 'Case'); From d7ee04e5fae7a0ced16cfd96f230c3e78dc2e8c4 Mon Sep 17 00:00:00 2001 From: s-nakajima Date: Fri, 24 Feb 2023 19:13:03 +0900 Subject: [PATCH 3/3] test: debug --- .github/workflows/tests.yml | 2 +- Test/Case/AllCircularNoticesTest.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 658371c..f82e971 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-18.04 strategy: matrix: - php: [ '7.3', '7.4' ] + php: [ '7.4' ] mysql: [ '5.7' ] env: diff --git a/Test/Case/AllCircularNoticesTest.php b/Test/Case/AllCircularNoticesTest.php index 02622f1..939c9a9 100644 --- a/Test/Case/AllCircularNoticesTest.php +++ b/Test/Case/AllCircularNoticesTest.php @@ -22,6 +22,7 @@ class AllCircularNoticesTest extends CakeTestSuite { * All test suite * * @return CakeTestSuite + * @SuppressWarnings(PHPMD) */ public static function suite() { $plugin = preg_replace('/^All([\w]+)Test$/', '$1', __CLASS__);