Skip to content

Instantly share code, notes, and snippets.

@andriesss
Last active December 12, 2015 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andriesss/4745015 to your computer and use it in GitHub Desktop.
Save andriesss/4745015 to your computer and use it in GitHub Desktop.
PHPUnit feature request to allow for docblock output while running tests
<?php
class UserTest extends PHPUnit_Extensions_SeleniumTestCase
{
/**
* Navigate to the registration page, and enter the following data in the registration form:
*
* - email: user@example.com
* - 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: user@example.com
- 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