for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace LaLit;
class Array2XMLTest extends \PHPUnit_Framework_TestCase
{
/**
* @expectedException \Exception
* @expectedExceptionMessage [Array2XML] Illegal character in attribute name. attribute: #attribute1 in node: root
*/
public function testInvalidAttributeNameThrowsException()
Array2XML::createXML(
'root',
[
'@attributes' => [
'#attribute1' => '',
],
]
);
}
* @expectedExceptionMessage [Array2XML] Illegal character in tag name. tag: #node in node: root
public function testInvalidSimpleTagNameThrowsException()
'#node' => 'bad node name',