Last active
December 12, 2015 08:38
-
-
Save andriesss/4745015 to your computer and use it in GitHub Desktop.
PHPUnit feature request to allow for docblock output while running tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class UserTest extends PHPUnit_Extensions_SeleniumTestCase | |
{ | |
/** | |
* Navigate to the registration page, and enter the following data in the registration form: | |
* | |
* - email: [email protected] | |
* - name: John Doe | |
* | |
* Click the "register" button, on which we should be redirected to a confirmation page that | |
* tells us a confirmation e-mail has been sent to the entered e-mail address. | |
* | |
* More info: http://foo/issue?id=1234 | |
*/ | |
public function testUserCanRegisterForAnAccount() | |
{ | |
// Selenium stuff goes here | |
} | |
} | |
phpunit --with-docblock-output | |
Desired output: | |
* User can register for an account | |
Navigate to the registration page, and enter the following data in the registration form: | |
- email: [email protected] | |
- name: John Doe | |
Click the "register" button, on which we should be redirected to a confirmation page that tells us | |
a confirmation e-mail has been sent to the entered e-mail address. | |
More info: http://foo/issue?id=1234 | |
Result: PASS | FAIL | SKIPPED | ERROR | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment