| @@ 21-31 (lines=11) @@ | ||
| 18 |         $this->assertTrue($validator->isValid("[email protected]", $validation)); | 
                                |
| 19 | }  | 
                                |
| 20 | ||
| 21 | public function testMultipleValidation()  | 
                                |
| 22 |     { | 
                                |
| 23 | $validator = new EmailValidator();  | 
                                |
| 24 |         $validation = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock(); | 
                                |
| 25 |         $validation->expects($this->once())->method("isValid")->willReturn(true); | 
                                |
| 26 |         $validation->expects($this->once())->method("getWarnings")->willReturn([]); | 
                                |
| 27 |         $validation->expects($this->once())->method("getError")->willReturn(null); | 
                                |
| 28 | $multiple = new MultipleValidationWithAnd([$validation]);  | 
                                |
| 29 | ||
| 30 |         $this->assertTrue($validator->isValid("[email protected]", $multiple)); | 
                                |
| 31 | }  | 
                                |
| 32 | }  | 
                                |
| 33 | ||
| @@ 35-46 (lines=12) @@ | ||
| 32 | new MultipleValidationWithAnd([]);  | 
                                |
| 33 | }  | 
                                |
| 34 | ||
| 35 | public function testValidationIsValid()  | 
                                |
| 36 |     { | 
                                |
| 37 |         $lexer = $this->getMockBuilder("Egulias\\EmailValidator\\EmailLexer")->getMock(); | 
                                |
| 38 | ||
| 39 |         $validation = $this->getMockBuilder("Egulias\\EmailValidator\\Validation\\EmailValidation")->getMock(); | 
                                |
| 40 |         $validation->expects($this->any())->method("isValid")->willReturn(true); | 
                                |
| 41 |         $validation->expects($this->once())->method("getWarnings")->willReturn([]); | 
                                |
| 42 | ||
| 43 | $multipleValidation = new MultipleValidationWithAnd([$validation]);  | 
                                |
| 44 |         $this->assertTrue($multipleValidation->isValid("[email protected]", $lexer)); | 
                                |
| 45 | $this->assertNull($multipleValidation->getError());  | 
                                |
| 46 | }  | 
                                |
| 47 | ||
| 48 | public function testAccumulatesWarnings()  | 
                                |
| 49 |     { | 
                                |