Skip to content

Commit 1c9d47c

Browse files
committed
Raise coverage
1 parent a3166de commit 1c9d47c

2 files changed

Lines changed: 4 additions & 36 deletions

File tree

src/XML/sp_200507/XPath.php

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44

55
namespace SimpleSAML\WebServices\SecurityPolicy\XML\sp_200507;
66

7-
use Dom;
8-
use SimpleSAML\WebServices\SecurityPolicy\Assert\Assert;
9-
use SimpleSAML\XML\DOMDocumentFactory;
107
use SimpleSAML\XML\TypedTextContentTrait;
11-
use SimpleSAML\XMLSchema\Type\StringValue;
8+
use SimpleSAML\XMLSchema\Type\Helper\XPathValue;
129

1310
/**
1411
* An XPath element
@@ -20,18 +17,5 @@ final class XPath extends AbstractSpElement
2017
use TypedTextContentTrait;
2118

2219

23-
public const string TEXTCONTENT_TYPE = StringValue::class;
24-
25-
26-
/**
27-
* Validate the content of the element.
28-
*
29-
* @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure
30-
*/
31-
protected function validateContent(string $content): void
32-
{
33-
$dom = new Dom\XPath(DOMDocumentFactory::create());
34-
$result = $dom->evaluate($content);
35-
Assert::isInstanceOf($result, Dom\NodeList::class);
36-
}
20+
public const string TEXTCONTENT_TYPE = XPathValue::class;
3721
}

src/XML/sp_200702/XPath.php

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@
44

55
namespace SimpleSAML\WebServices\SecurityPolicy\XML\sp_200702;
66

7-
use Dom;
8-
use SimpleSAML\WebServices\SecurityPolicy\Assert\Assert;
9-
use SimpleSAML\XML\DOMDocumentFactory;
107
use SimpleSAML\XML\TypedTextContentTrait;
11-
use SimpleSAML\XMLSchema\Type\StringValue;
8+
use SimpleSAML\XMLSchema\Type\Helper\XPathValue;
129

1310
/**
1411
* An XPath element
@@ -20,18 +17,5 @@ final class XPath extends AbstractSpElement
2017
use TypedTextContentTrait;
2118

2219

23-
public const string TEXTCONTENT_TYPE = StringValue::class;
24-
25-
26-
/**
27-
* Validate the content of the element.
28-
*
29-
* @throws \SimpleSAML\XMLSchema\Exception\SchemaViolationException on failure
30-
*/
31-
protected function validateContent(string $content): void
32-
{
33-
$dom = new Dom\XPath(DOMDocumentFactory::create());
34-
$result = $dom->evaluate($content);
35-
Assert::isInstanceOf($result, Dom\NodeList::class);
36-
}
20+
public const string TEXTCONTENT_TYPE = XPathValue::class;
3721
}

0 commit comments

Comments
 (0)