Skip to content

portrino/phpunit-xsdvalidation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XSD schema validation constraint for PHPUnit

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);

About

XSD schema validation constraint for PHPUnit

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%