Skip to content

Commit

Permalink
Merge pull request #17 from shatterproof/symbols
Browse files Browse the repository at this point in the history
Fix: Adjust `testUnexpectedSymbolsInput` for unfiltered symbols
  • Loading branch information
valorin authored Jan 11, 2024
2 parents 0d42266 + e493958 commit 33918e5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions tests/StringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function testUnexpectedNumbersInput()

public function testUnexpectedSymbolsInput()
{
$generator = Random::useSymbols([2, 3, 4, 'F', 'a', '#', 88, '!', '9']);
$generator = Random::useSymbols([2, 3, 4, 'F', 'a', '#', '!', '9']);

for ($i = 0; $i < 100; $i++) {
$string = $generator->string(
Expand All @@ -341,10 +341,7 @@ public function testUnexpectedSymbolsInput()
$requireAll = false
);

$this->assertRegExpCustom('/[#!]/', $string);
$this->assertRegExpCustom('/[^A-Z]/', $string);
$this->assertRegExpCustom('/[^a-f]/', $string);
$this->assertRegExpCustom('/[^1-9]/', $string);
$this->assertRegExpCustom('/^[2-4Fa#!9]+$/', $string);
}
}
}

0 comments on commit 33918e5

Please sign in to comment.