Skip to content

Commit ae93c55

Browse files
committed
Add validation tests
1 parent 01c17fc commit ae93c55

File tree

7 files changed

+140
-383
lines changed

7 files changed

+140
-383
lines changed

src/Classes/Validation.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function validateConfig(): bool
2525
->throwExceptionOnFailure(false)
2626
->runInline([
2727
'door-access' => [
28-
Rule::make('code_length')->rules(['required', 'integer', 'min:6', 'max:19']),
28+
Rule::make('code_length')->rules(['required', 'integer', 'min:1', 'max:19']),
2929
Rule::make('character_repeated_limit')->rules(['required', 'integer', 'min:3', 'max:19']),
3030
Rule::make('sequence_length_limit')->rules(['required', 'integer', 'min:3']),
3131
Rule::make('unique_characters_limit')->rules(['required', 'integer', 'min:3']),
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
test('exceptions extend the base exception class')
4+
->expect('Veeqtoh\DoorAccess\Exceptions')
5+
->classes()
6+
->toExtend(Exception::class);

tests/CodeGeneratorTest.php

Lines changed: 0 additions & 109 deletions
This file was deleted.

tests/CodeManagerTest.php

Lines changed: 0 additions & 106 deletions
This file was deleted.

tests/Database/MySQLDatabaseTest.php

Lines changed: 0 additions & 85 deletions
This file was deleted.

0 commit comments

Comments
 (0)