Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
Enhancement: Assert that StringProvider::arbitrary() provides all kin…
Browse files Browse the repository at this point in the history
…ds of values
  • Loading branch information
localheinz committed Oct 4, 2020
1 parent 1832627 commit 06a7bc3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/Unit/DataProvider/StringProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public function testArbitraryReturnsGeneratorThatProvidesStringsThatAreNeitherEm
'string-arbitrary-word' => Util\DataProvider\Specification\Closure::create(static function (string $value): bool {
return '' !== $value && '' !== \trim($value);
}),
'string-blank-carriage-return' => Util\DataProvider\Specification\Identical::create("\r"),
'string-blank-line-feed' => Util\DataProvider\Specification\Identical::create("\n"),
'string-blank-space' => Util\DataProvider\Specification\Identical::create(' '),
'string-blank-tab' => Util\DataProvider\Specification\Identical::create("\t"),
'string-empty' => Util\DataProvider\Specification\Identical::create(''),
'string-untrimmed-carriage-return' => Util\DataProvider\Specification\Pattern::create('/^\r{1,5}\w+\r{1,5}$/'),
'string-untrimmed-line-feed' => Util\DataProvider\Specification\Pattern::create('/^\n{1,5}\w+\n{1,5}$/'),
'string-untrimmed-space' => Util\DataProvider\Specification\Pattern::create('/^\s{1,5}\w+\s{1,5}$/'),
Expand Down

0 comments on commit 06a7bc3

Please sign in to comment.