throwExceptions() public method

public throwExceptions ( boolean $flag = true )
$flag boolean
Exemplo n.º 1
0
 /**
  * @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));
 }