/** * @expectedException \Ddeboer\DataImport\Exception\ValidationException */ public function testProcessWithExceptions() { $data = ['title' => null]; $this->filter->add('title', $constraint = new Constraints\NotNull()); $this->filter->throwExceptions(); $list = new ConstraintViolationList(); $list->add($this->buildConstraintViolation()); $this->validator->expects($this->once())->method('validate')->willReturn($list); $this->assertFalse($this->filter->process($data)); }