Skip to content
PHPSpec extension that allows you to use annotated methods for tests.
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
README.md
composer.json

README.md

PHPSpec annotation extension

A PHPSpec extension that allows you to use annotated methods for tests.

Installation

composer require drupol/phpspec-annotation --dev

Usage

Enable extension in phpspec.yml (or phpspec.yml.dist) file:

extensions:
  drupol\PhpspecAnnotation\PhpspecAnnotation: ~

Then, you can use the annotation @name in the documentation block of your spec methods.

Example, instead of writing:

public function it_can_read_an_xml_file_with_specific_settings() {
  // test code here
}

You can now write:

/**
 * @name It can read an xml file with specific settings.
 */
public function readXmlFile() {
  // test code here
}

Contributing

Feel free to contribute to this library by sending Github pull requests. I'm quite reactive :-)

You can’t perform that action at this time.