Skip to content

Commit

Permalink
Adding float test.
Browse files Browse the repository at this point in the history
  • Loading branch information
stratease committed Sep 6, 2024
1 parent b7a2b4a commit 0247d8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/_support/Helper/MockModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

class MockModel extends Model {
protected $properties = [
'id' => 'int',
'firstName' => [ 'string', 'Michael' ],
'lastName' => 'string',
'emails' => [ 'array', [] ],
'id' => 'int',
'firstName' => [ 'string', 'Michael' ],
'lastName' => 'string',
'emails' => [ 'array', [] ],
'microseconds' => 'float',
];
}
1 change: 1 addition & 0 deletions tests/wpunit/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ public function invalidTypeProvider() {
[ 'id', 'Not an integer' ],
[ 'firstName', 100 ],
[ 'emails', 'Not an array' ],
[ 'microseconds', 'Not a float' ]
];
}
}

0 comments on commit 0247d8a

Please sign in to comment.