drupol / phpspec-annotation
PHPSpec extension that allows you to use annotated methods for tests.
Installs: 24 541
Dependents: 4
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >= 5.6
This package is auto-updated.
Last update: 2022-03-21 10:52:25 UTC
README
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 :-)