Skip to content

Commit

Permalink
Add default value tests for assoc mode with no type casting
Browse files Browse the repository at this point in the history
  • Loading branch information
erayd committed Feb 2, 2017
1 parent 13d0e34 commit 02c52d9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/Constraints/DefaultPropertiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,15 @@ public function testValidCasesUsingAssoc($input, $schema, $expectOutput = null)
$factory = new Factory(null, null, Constraint::CHECK_MODE_TYPE_CAST | Constraint::CHECK_MODE_APPLY_DEFAULTS);
self::testValidCases($input, $schema, $expectOutput, new Validator($factory));
}

/**
* @dataProvider getValidTests
*/
public function testValidCasesUsingAssocWithoutTypeCast($input, $schema, $expectOutput = null)
{
$input = json_decode($input, true);
$factory = new Factory(null, null, Constraint::CHECK_MODE_APPLY_DEFAULTS);
self::testValidCases($input, $schema, $expectOutput, new Validator($factory));

}
}

0 comments on commit 02c52d9

Please sign in to comment.