Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bartfeenstra/doobie
Doobie (do-by) allows @todo annotations to be extended with metadata to specify by which event the described action must have been taken.
https://github.com/bartfeenstra/doobie
Last synced: 2 months ago
JSON representation
Doobie (do-by) allows @todo annotations to be extended with metadata to specify by which event the described action must have been taken.
- Host: GitHub
- URL: https://github.com/bartfeenstra/doobie
- Owner: bartfeenstra
- License: mit
- Created: 2014-05-20T15:56:40.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-05-21T06:29:53.000Z (over 10 years ago)
- Last Synced: 2023-08-21T08:09:52.321Z (over 1 year ago)
- Language: PHP
- Size: 160 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Doobie
[![Build Status](https://travis-ci.org/bartfeenstra/Doobie.png?branch=master)](https://travis-ci.org/bartfeenstra/Dobie)
[![Coverage Status](https://coveralls.io/repos/bartfeenstra/Doobie/badge.png?branch=master)](https://coveralls.io/r/bartfeenstra/Doobie?branch=master)
[![Latest Stable Version](https://poser.pugx.org/bartfeenstra/Doobie/v/stable.png)](https://packagist.org/packages/bartfeenstra/Doobie)Doobie (*"do by"*) allows `@todo` annotations to be extended with metadata to specify
by which event the described action must have been taken.Doobie was inspired by [andyw8/do_by](https://github.com/andyw8/do_by), which is
specific to Ruby.# Usage
Any `@todo` annotation can contain a Doobie marker that is formatted like
`[doobie:type:expected_value]`, where `type` is the type of constraint
that must be checked (such as `php-version` or `datetime`), and
`expected_value` is the value the constraint type must have for the marker to
become expired.## php-version
This built-in constraint type compares the expected and actual PHP versions. Use
like `[doobie:php-version:>=5.5]`.## datetime
This built-in constraint type compares the expected and actual dates and times.
Use like `[doobie:datetime:2014-05-20 00:00 +0]`## PHPUnit
In order to test all markers through PHPUnit, write a test case that
instantiates one or more file finders
(`\BartFeenstra\Doobie\FileFinder\FileFinderInterface`), parsers
(`\BartFeenstra\Doobie\Parser\ParserInterface`), and constraint evaluators
(`\BartFeenstra\Doobie\Constraint\ConstriantEvaluatorInterface`). The test case
can then use
`\BartFeenstra\Doobie\PhpUnit\AssertTrait` and `$this->assertDoobieMarkers($file_finders, $parsers, $constraint_evaluators)`
to trigger test failures for expires markers.