Preparations
- apply patch from the D496 and D495
- if you don't have Selenium Server installed, then install it using instructions from the Preparations section of the D451
- in IDE:
- in the core/tests/Functional folder create CoreWorkflowTest.php file with this content:
<?php class CoreWorkflowTest extends AbstractBrowserTestCase { public function testSample() { $session = $this->getSession(); $url = $this->Application->HREF('platform/login/register', '', array('no_amp' => 1)); $session->visit($url); $this->assertTrue(true); } }
- remove contents of the core/units/helpers/xml_helper.php and core/units/helpers/xml_helper5.php files
- in the "tools/build/targets/common.xml" file add these lines after <arg path="${phpunit.config.file}"/> line (4 places) <arg value="--testdox"/> line
- in the tools/run_event.php file comment out the exit_code(1, 'This script needs to be enabled manually !'); line
- in CLI:
- run the composer install command, to actualize vendor folder content
run the phing -f tools/build/build_custom.xml db-dump command to create a dumpfor each of the build-*.sql files created in the system directory:remove the mysqldump: [Warning] Using a password on the command line interface can be insecure. line (if found)save changes
Part 1 - the PHPUnit isn't used in the default build workflow
- delete the "build" folder
- run the phing -f tools/build/build_all.xml build command
- confirm, by looking at the colorized output of the above command, that phpunit-ci or phpunit targets weren't called
- delete the "build" folder
- run the phing -f tools/build/build_custom.xml build command
- confirm, by looking at the colorized output of the above command, that phpunit-ci or phpunit targets weren't called
Part 2 - core test suite structure testing (via phpunit itself)
- run the vendor/bin/phpunit -c tools/build/inc/phpunit.xml --testdox command
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: .../tools/build/inc/phpunit.xml kFormatter ... SampleUnit ... CoreWorkflow ... SampleWorkflow ...
- run the vendor/bin/phpunit -c tools/build/inc/phpunit.xml --testdox --testsuite Unit command
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: .../tools/build/inc/phpunit.xml kFormatter ... SampleUnit ...
- run the vendor/bin/phpunit -c tools/build/inc/phpunit.xml --testdox --testsuite Functional command
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: .../tools/build/inc/phpunit.xml CoreWorkflow ... SampleWorkflow ...
Part 3 - custom test suite structure testing (via phpunit itself)
- run the vendor/bin/phpunit -c tools/build/inc/custom_phpunit.xml --testdox command
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: .../tools/build/inc/phpunit.xml SampleUnit ... SampleWorkflow ...
- run the vendor/bin/phpunit -c tools/build/inc/custom_phpunit.xml --testdox --testsuite Unit command
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: .../tools/build/inc/phpunit.xml SampleUnit ...
- run the vendor/bin/phpunit -c tools/build/inc/custom_phpunit.xml --testdox --testsuite Functional command
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: .../tools/build/inc/phpunit.xml SampleWorkflow ...
Part 4 - core test suite structure testing (via phing's "phpunit" task)
- delete the "build" folder
- run the phing -f tools/build/build_all.xml phpunit command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files doesn't exist
- confirm, by looking at the colorized output of the above command, that phpunit target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/phpunit.xml kFormatter ... SampleUnit ... CoreWorkflow ... SampleWorkflow ...
- delete the "build" folder
- run the phing -f tools/build/build_all.xml phpunit -Dphpunit.testsuite=Unit command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files doesn't exist
- confirm, by looking at the colorized output of the above command, that phpunit target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/phpunit.xml kFormatter ... SampleUnit ...
- delete the "build" folder
- run the phing -f tools/build/build_all.xml phpunit -Dphpunit.testsuite=Functional command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files doesn't exist
- confirm, by looking at the colorized output of the above command, that phpunit target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/phpunit.xml CoreWorkflow ... SampleWorkflow ...
Part 5 - core test suite structure testing (via phing's "phpunit-ci" task)
- delete the "build" folder
- run the phing -f tools/build/build_all.xml phpunit-ci command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files were created and they're not empty
- confirm, by looking at the colorized output of the above command, that phpunit-ci target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/phpunit.xml kFormatter ... SampleUnit ... CoreWorkflow ... SampleWorkflow ... Generating code coverage report in Clover XML format ... done
- delete the "build" folder
- run the phing -f tools/build/build_all.xml phpunit-ci -Dphpunit.testsuite=Unit command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files were created and they're not empty
- confirm, by looking at the colorized output of the above command, that phpunit-ci target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/phpunit.xml kFormatter ... SampleUnit ... Generating code coverage report in Clover XML format ... done
- delete the "build" folder
- run the phing -f tools/build/build_all.xml phpunit-ci -Dphpunit.testsuite=Functional command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files were created and they're not empty
- confirm, by looking at the colorized output of the above command, that phpunit-ci target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/phpunit.xml CoreWorkflow ... SampleWorkflow ... Generating code coverage report in Clover XML format ... done
Part 6 - custom test suite structure testing (via phing's "phpunit" task)
- delete the "build" folder
- run the phing -f tools/build/build_custom.xml phpunit command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files doesn't exist
- confirm, by looking at the colorized output of the above command, that phpunit target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/custom_phpunit.xml SampleUnit ... SampleWorkflow ...
- delete the "build" folder
- run the phing -f tools/build/build_custom.xml phpunit -Dphpunit.testsuite=Unit command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files doesn't exist
- confirm, by looking at the colorized output of the above command, that phpunit target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/custom_phpunit.xml SampleUnit ...
- delete the "build" folder
- run the phing -f tools/build/build_custom.xml phpunit -Dphpunit.testsuite=Functional command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files doesn't exist
- confirm, by looking at the colorized output of the above command, that phpunit target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/custom_phpunit.xml SampleWorkflow ...
Part 7 - custom test suite structure testing (via phing's "phpunit-ci" task)
- delete the "build" folder
- run the phing -f tools/build/build_custom.xml phpunit-ci command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files were created and they're not empty
- confirm, by looking at the colorized output of the above command, that phpunit-ci target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/custom_phpunit.xml SampleUnit ... SampleWorkflow ... Generating code coverage report in Clover XML format ... done
- delete the "build" folder
- run the phing -f tools/build/build_custom.xml phpunit-ci -Dphpunit.testsuite=Unit command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files were created and they're not empty
- confirm, by looking at the colorized output of the above command, that phpunit-ci target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/custom_phpunit.xml SampleUnit ... Generating code coverage report in Clover XML format ... done
- delete the "build" folder
- run the phing -f tools/build/build_custom.xml phpunit-ci -Dphpunit.testsuite=Functional command
- confirm, that "build/logs/clover.xml" and "build/logs/junit.xml" files were created and they're not empty
- confirm, by looking at the colorized output of the above command, that phpunit-ci target was called
- confirm, that the output looks similar to this:
PHPUnit 5.7.27 by Sebastian Bergmann and contributors. Runtime: PHP 5.6.40 with Xdebug 2.5.5 Configuration: /mnt/UserData/home/alex/web/d/in-portal.52x/tools/build/inc/custom_phpunit.xml SampleWorkflow ... Generating code coverage report in Clover XML format ... done
Testing (part 8 - the "/system/mink_config.php" requirement)
- move the "mink_config.php" file away from the "/system" folder
- run the vendor/bin/phpunit -c tools/build/inc/phpunit.xml command
- confirm, that command now fails with "The Mink configuration file does not exist." message (via thrown exception)
- move the "mink_config.php" file back to "/system" folder