Skip to content

Commit b556101

Browse files
committed
add duplicate_characters_is_not_valid test
1 parent 7f42e03 commit b556101

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/ValidDuplicateCharacterTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,19 @@ public function duplicate_characters_is_valid()
3030

3131
$this->assertTrue($passes);
3232
}
33+
34+
/**
35+
* Test duplicate characters is not valid.
36+
*
37+
* @test
38+
* @return void
39+
*/
40+
public function duplicate_characters_is_not_valid()
41+
{
42+
$rules = ['duplicate_number' => [new ValidDuplicateCharacter()]];
43+
$data = ['duplicate_number' => '1,2,2,3,3,3,4,5,6,7,8,9'];
44+
$passes = $this->app['validator']->make($data, $rules)->passes();
45+
46+
$this->assertFalse($passes);
47+
}
3348
}

0 commit comments

Comments
 (0)