Respect\Validation\Rules\KeySet::assert PHP Method

assert() public method

public assert ( $input )
    public function assert($input)
    {
        $this->checkKeys($input);
        return parent::assert($input);
    }

Usage Example

Example #1
0
 /**
  * @expectedException Respect\Validation\Exceptions\KeySetException
  * @expectedExceptionMessage Must have keys { "name" }
  * @dataProvider providerForInvalidArguments
  */
 public function testShouldThrowExceptionInCaseArgumentIsAnythingOtherThanArray($input)
 {
     $keySet = new KeySet(new Key('name'));
     $keySet->assert($input);
 }
All Usage Examples Of Respect\Validation\Rules\KeySet::assert