php-7.4.27-mk1-mac/lib/php/pear/test/XML_Util/tests/SplitQualifiedNameTests.php

32 lines
839 B
PHP
Raw Permalink Normal View History

2023-04-27 18:29:57 +03:00
<?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));
}
}