portrino/phpunit-xsdvalidation

XSD schema validation constraint for PHPUnit

1.1.1 2019-01-22 11:47 UTC

This package is auto-updated.

Last update: 2024-11-26 13:53:17 UTC


README

Installation

   composer install jasny/phpunit-xsdvalidation

Usage

   $constraint = new Jasny\PHPUnit\Constraint\XSDValidation("myschema.xsd");

   $xml = $this->object->doSomething();
   $this->assertThat($xml, $constraint);

Usage with mock object

   $constraint = new Jasny\PHPUnit\Constraint\XSDValidation("myschema.xsd");

   $mock = $this->getMock('Foo\Bar', ['doSomething']);
   $mock->expects($this->once())
        ->method('doSomething')
        ->with($constraint);