jasny/phpunit-xsdvalidation

XSD schema validation constraint for PHPUnit

Installs: 11

Dependents: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

v1.0.1 2014-04-06 11:37 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);