From bb19e31f9428a9895df03036fe22a7440084ada7 Mon Sep 17 00:00:00 2001 From: Jim Parry Date: Mon, 18 Feb 2019 10:22:51 -0800 Subject: [PATCH 1/4] Add tests/_support to distributions --- admin/release-appstarter | 2 +- admin/release-framework | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/release-appstarter b/admin/release-appstarter index 206d17287f30..87281c153693 100644 --- a/admin/release-appstarter +++ b/admin/release-appstarter @@ -12,7 +12,7 @@ git checkout $branch echo -e "${BOLD}Build the framework distributable${NORMAL}" echo -e "${BOLD}Copy the main files/folders...${NORMAL}" -releasable='app public writable README.md contributing.md env license.txt spark' +releasable='app public writable README.md contributing.md env license.txt spark tests/_support' for fff in $releasable ; do if [ -d "$fff" ] ; then rm -rf $fff diff --git a/admin/release-framework b/admin/release-framework index 50ec5f20646b..110da980eaa8 100644 --- a/admin/release-framework +++ b/admin/release-framework @@ -12,7 +12,7 @@ git checkout $branch echo -e "${BOLD}Build the framework distributable${NORMAL}" echo -e "${BOLD}Copy the main files/folders...${NORMAL}" -releasable='app docs public system writable contributing.md env license.txt spark' +releasable='app docs public system writable contributing.md env license.txt spark tests/_support' for fff in $releasable ; do if [ -d "$fff" ] ; then rm -rf $fff From ac997e78c3076ae9803b36ff3c7cdb43d4ff2288 Mon Sep 17 00:00:00 2001 From: Jim Parry Date: Mon, 18 Feb 2019 10:26:03 -0800 Subject: [PATCH 2/4] Add phpunit.xml to app-starter distribution --- admin/starter/phpunit.xml.dist | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 admin/starter/phpunit.xml.dist diff --git a/admin/starter/phpunit.xml.dist b/admin/starter/phpunit.xml.dist new file mode 100644 index 000000000000..73d51ffc8dee --- /dev/null +++ b/admin/starter/phpunit.xml.dist @@ -0,0 +1,28 @@ + + + + + ./tests + ./tests/system + + + + + + ./system + + ./system + + + + + From abab2e94e11b28ab72ba47392a0003fff7802339 Mon Sep 17 00:00:00 2001 From: Jim Parry Date: Mon, 18 Feb 2019 11:13:39 -0800 Subject: [PATCH 3/4] Move DOMParser into system/Tests --- .../DOM => system/Test}/DOMParser.php | 40 ++++++++++++++++++- system/Test/FeatureResponse.php | 3 +- tests/_support/Helpers/ControllerResponse.php | 2 +- .../Database/Live/SQLite/AlterTableTest.php | 3 ++ tests/system/Test/DOMParserTest.php | 2 - 5 files changed, 43 insertions(+), 7 deletions(-) rename {tests/_support/DOM => system/Test}/DOMParser.php (78%) diff --git a/tests/_support/DOM/DOMParser.php b/system/Test/DOMParser.php similarity index 78% rename from tests/_support/DOM/DOMParser.php rename to system/Test/DOMParser.php index 3a190faf4364..55bd10eff96a 100644 --- a/tests/_support/DOM/DOMParser.php +++ b/system/Test/DOMParser.php @@ -1,4 +1,40 @@ - Date: Mon, 18 Feb 2019 11:27:39 -0800 Subject: [PATCH 4/4] Move Controller Response & Tester to system/Test --- .../Test}/ControllerResponse.php | 39 +++++++++++++++++- .../Test}/ControllerTester.php | 40 ++++++++++++++++++- tests/system/Helpers/FilesystemHelperTest.php | 2 +- user_guide_src/source/testing/controllers.rst | 4 +- 4 files changed, 78 insertions(+), 7 deletions(-) rename {tests/_support/Helpers => system/Test}/ControllerResponse.php (62%) rename {tests/_support/Helpers => system/Test}/ControllerTester.php (66%) diff --git a/tests/_support/Helpers/ControllerResponse.php b/system/Test/ControllerResponse.php similarity index 62% rename from tests/_support/Helpers/ControllerResponse.php rename to system/Test/ControllerResponse.php index 0545bf81b100..393fb879c01c 100644 --- a/tests/_support/Helpers/ControllerResponse.php +++ b/system/Test/ControllerResponse.php @@ -1,6 +1,41 @@ -assertEquals(SUPPORTPATH . 'Helpers/', set_realpath(SUPPORTPATH . 'Files/../Helpers', true)); + $this->assertEquals(SUPPORTPATH . 'Models/', set_realpath(SUPPORTPATH . 'Files/../Models', true)); } } diff --git a/user_guide_src/source/testing/controllers.rst b/user_guide_src/source/testing/controllers.rst index d4c6819ab7e3..21615673d18f 100644 --- a/user_guide_src/source/testing/controllers.rst +++ b/user_guide_src/source/testing/controllers.rst @@ -18,7 +18,7 @@ within your tests::