php-8.3.11-linux/lib/php/pear/test/XML_Util/tests/SplitQualifiedNameTests.php

32 lines
839 B
PHP

<?php
class SplitQualifiedNameTests extends AbstractUnitTests
{
/**
* @covers XML_Util::splitQualifiedName()
*/
public function testSplitQualifiedNameWithoutNamespace()
{
$original = "xslt:stylesheet";
$expected = array(
'namespace' => 'xslt',
'localPart' => 'stylesheet',
);
$this->assertEquals($expected, XML_Util::splitQualifiedName($original));
}
/**
* @covers XML_Util::splitQualifiedName()
*/
public function testSplitQualifiedNameWithNamespace()
{
$original = "stylesheet";
$namespace = "myNs";
$expected = array(
'namespace' => 'myNs',
'localPart' => 'stylesheet',
);
$this->assertEquals($expected, XML_Util::splitQualifiedName($original, $namespace));
}
}