File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,17 @@ public function testSchemaValidation(): void
3232 if (!class_exists (self ::$ testedClass )) {
3333 $ this ->markTestSkipped (
3434 'Unable to run ' . self ::class . '::testSchemaValidation(). Please set ' . self ::class
35- . ':$testedClass to a class-string representing the XML-class being tested ' ,
35+ . ':$testedClass to a class-string representing the XML-class being tested. ' ,
36+ );
37+ } elseif (!(self ::$ testedClass instanceof SchemaValidatableElementInterface)) {
38+ $ this ->markTestSkipped (
39+ 'Unable to run ' . self ::class . '::testSchemaValidation() because the class set in ' . self ::class
40+ . ':$testedClass does not implement the SchemaValidableElementInterface. ' ,
3641 );
3742 } elseif (empty (self ::$ xmlRepresentation )) {
3843 $ this ->markTestSkipped (
3944 'Unable to run ' . self ::class . '::testSchemaValidation(). Please set ' . self ::class
40- . ':$xmlRepresentation to a DOMDocument representing the XML-class being tested ' ,
45+ . ':$xmlRepresentation to a DOMDocument representing the XML-class being tested. ' ,
4146 );
4247 } else {
4348 // Validate before serialization
Original file line number Diff line number Diff line change 55namespace SimpleSAML \Test \XML ;
66
77use SimpleSAML \XML \AbstractElement ;
8- use SimpleSAML \XML \URIElementTrait ;
98use SimpleSAML \XML \SchemaValidatableElementInterface ;
109use SimpleSAML \XML \SchemaValidatableElementTrait ;
10+ use SimpleSAML \XML \URIElementTrait ;
1111
1212/**
1313 * Empty shell class for testing URIElement.
You can’t perform that action at this time.
0 commit comments