| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 32 | public function testXmlValidatorFunction() |
||
| 33 | { |
||
| 34 | $xmlValidator = $this->getMockBuilder('OldSound\RabbitMqBundle\RabbitMq\XmlValidator') |
||
| 35 | ->disableOriginalConstructor() |
||
| 36 | ->getMock(); |
||
| 37 | |||
| 38 | $xmlValidator->setSchema( |
||
| 39 | "OldSound\RabbitMqBundle\TestValidation/schema/XmlValidation.xsd", |
||
| 40 | null, |
||
| 41 | ); |
||
| 42 | |||
| 43 | $xml_msg = <<<'XML' |
||
| 44 | <person> |
||
| 45 | <firstName>John</firstName> |
||
| 46 | <from>Doe</from> |
||
| 47 | <age>21</age> |
||
| 48 | </person> |
||
| 49 | XML; |
||
| 50 | $xmlValidator->method('getContentType')->willReturn('application/xml'); |
||
| 51 | $this->assertEquals(null, $xmlValidator->validate($xml_msg)); |
||
| 52 | } |
||
| 54 |