Skip to content

Commit a9a2d9c

Browse files
committed
Fix build
1 parent 0d12417 commit a9a2d9c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/XMLSchema/Type/Helper/XPathValue.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ protected function validateValue(string $content): void
2323
{
2424
$dom = new Dom\XPath(DOMDocumentFactory::create());
2525

26-
$result = $dom->evaluate($content);
27-
Assert::isInstanceOf($result, Dom\NodeList::class);
26+
$result = @$dom->evaluate($content);
27+
Assert::isInstanceOf($result, Dom\NodeList::class, \RuntimeException::class);
2828
}
2929
}

tests/XMLSchema/Type/Helper/XPathValueTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace SimpleSAML\Test\XMLSchema\Type\Builtin;
66

7+
use Error;
78
use PHPUnit\Framework\Attributes\CoversClass;
89
use PHPUnit\Framework\Attributes\DataProvider;
910
use PHPUnit\Framework\TestCase;
@@ -28,7 +29,7 @@ public function testString(bool $shouldPass, string $xpath): void
2829
try {
2930
$value = XPathValue::fromString($xpath);
3031
$this->assertTrue($shouldPass);
31-
} catch (AssertionFailedException $e) {
32+
} catch (Error) {
3233
$this->assertFalse($shouldPass);
3334
}
3435
}

0 commit comments

Comments
 (0)