public function testShouldValidateObjects()
{
$rule = new File();
$object = $this->createMock('SplFileInfo', ['isFile'], ['somefile.txt']);
$object->expects($this->once())->method('isFile')->will($this->returnValue(true));
$this->assertTrue($rule->validate($object));
}