2017 © Pedro Peláez
 

project php-coding-dojo

Empty project which can be used in a PHP and PHPUnit-oriented coding dojo

image

matthiasnoback/php-coding-dojo

Empty project which can be used in a PHP and PHPUnit-oriented coding dojo

  • Tuesday, March 4, 2014
  • by matthiasnoback
  • Repository
  • 2 Watchers
  • 5 Stars
  • 91 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

PHP coding dojo project

Setup

To install the project:, (*1)

php composer.phar create-project matthiasnoback/php-coding-dojo [path] *

You will have an empty src/ directory and a phpunit.xml.dist that is configured to run all the PHPUnit tests names *Test.php in the directories src/*/Tests (and their subdirectories). When you use this configuration the Composer autoloader will be initialized automatically to make sure that every namespaced class inside src/ can be auto-loaded from within the test cases., (*2)

Configure PHPStorm to run the tests

  • Choose Run, Edit configurations... and remove any existing configuration.
  • Select Defaults - PHPUnit, put a check before Use alternative configuration file and select phpunit.xml.dist from this project.
  • Click the button to the right of this field. In the dialog that appears select Use custom loader and select the file vendor/autoload.php inside your project. This will make sure PHPStorm uses the bundled version of PHPUnit.

To validate your setup once you have installed this project, run the tests: right-click on the src/ directory and then select Run 'src'., (*3)

Run the unit tests

To run all tests in a testcase press Ctrl + Shift + F10 when the cursor is not inside a method. To run one test press Ctrl + Shift + F10 when the cursor is inside a method. To repeat the previous test run press Shift + F10., (*4)

Or you can run the tests from the command-line:, (*5)

php vendor/bin/phpunit

When you first run the tests, PHPStorm might ask you to supply a PHP interpreter., (*6)

PHPUnit cheatsheet

You can use my PHPUnit cheatsheet as a quick reference for PHPUnit usage., (*7)

The Versions

04/03 2014

dev-master

9999999-dev

Empty project which can be used in a PHP and PHPUnit-oriented coding dojo

  Sources   Download

MIT

The Requires

 

26/02 2014

v0.1.0

0.1.0.0

Empty project which can be used in a PHP and PHPUnit-oriented coding dojo

  Sources   Download

MIT

The Requires