public function testShouldReturnFalseWhenSimpleObjectInvalidUsingGetterMethod()
 {
     $mock = new Mock();
     $mock->setName("pedro");
     $config['registering'] = array('name' => v::maxLength(1));
     $validationObject = ValidationGroupsFactory::build(new ArrayParserObject($config));
     $result = $validationObject->validate($mock, "registering", array('name' => "'{{input}}' invalid name"));
     $errors = $validationObject->getViolations();
     $this->assertFalse($result);
     $this->assertEquals("'{{input}}' invalid name", $errors["name"]);
 }
 /**
  * @expectedException \Melody\Validation\Exceptions\InvalidInputException
  */
 public function testShouldThrowInvalidInputExceptionWhenFirstArgumentNotIsArray()
 {
     $validationGroups = ValidationGroupsFactory::build(new ArrayParser(array()));
     $this->assertInstanceOf('Melody\\Validation\\ValidationGroups\\ValidationGroups', $validationGroups);
     $validationGroups->validate("string", "registering");
 }