/** * @expectedException UnexpectedValueException * @expectedExceptionMessage You first need to call a property for this filter */ public function testShouldThrowExceptionWhenCallingAFilterBeforeCallAProperty() { $criteria = new Criteria(new Factory()); $criteria->equalTo(2); }