Skip to content

Commit

Permalink
test: Adds test for quantifier times equal zero
Browse files Browse the repository at this point in the history
  • Loading branch information
rudashi committed Oct 13, 2024
1 parent f2447c1 commit 52571fc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/Unit/QuantifiersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@
->toBe('/\w+/');
});

it('can add zero `times` quantifier causes token to be ignored', function () {
$regex = fluentBuilder()->word()->times(0);

expect($regex->get())
->toBe('/\w{0}/');
});

it('can add `times` quantifier', function () {
$regex = fluentBuilder()->word()->times(1);

Expand Down

0 comments on commit 52571fc

Please sign in to comment.