File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1616 */
1717trait SchemaValidationTestTrait
1818{
19+ /** @var string|null */
20+ protected static ?string $ schemaFile = null ;
21+
1922 /** @var class-string */
2023 protected static string $ testedClass ;
2124
@@ -41,14 +44,14 @@ public function testSchemaValidation(): void
4144 );
4245 } else {
4346 // Validate before serialization
44- self ::$ testedClass ::schemaValidate (self ::$ xmlRepresentation );
47+ self ::$ testedClass ::schemaValidate (self ::$ xmlRepresentation, self :: $ schemaFile );
4548
4649 // Perform serialization
4750 $ class = self ::$ testedClass ::fromXML (self ::$ xmlRepresentation ->documentElement );
4851 $ serializedClass = $ class ->toXML ();
4952
5053 // Validate after serialization
51- self ::$ testedClass ::schemaValidate ($ serializedClass ->ownerDocument );
54+ self ::$ testedClass ::schemaValidate ($ serializedClass ->ownerDocument , self :: $ schemaFile );
5255
5356 // If we got this far and no exceptions were thrown, consider this test passed!
5457 $ this ->addToAssertionCount (1 );
You can’t perform that action at this time.
0 commit comments