Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/signpostmarv/php-traceverbal-expressions

Proof-of-concept for a traceable wrapper to PHPVerbalExpressions for eliminating the need to hand-write JSON for verbal-expressions-tests
https://github.com/signpostmarv/php-traceverbal-expressions

Last synced: about 1 month ago
JSON representation

Proof-of-concept for a traceable wrapper to PHPVerbalExpressions for eliminating the need to hand-write JSON for verbal-expressions-tests

Awesome Lists containing this project

README

        

Proof-of-concept for a traceable wrapper to [PHPVerbalExpressions](
https://github.com/VerbalExpressions/PHPVerbalExpressions
)
for eliminating the need to hand-write JSON for [verbal-expressions-tests](
https://github.com/SignpostMarv/Verbal-Expressions-Tests
)

# Example
Expected output, ```bool(true)```
```php
use TraceverbalExpressions\PHPTraceverbalExpressions\VerbalExpressions;
$foo = new VerbalExpressions;
$foo->startOfLine()->then('foo')->anyOf('abc')->multiple('')->endOfLine();
$bar = json_encode($foo);
$baz = new VerbalExpressions($bar);
var_dump($bar === json_encode($baz));
```