Dropped Convert class

All it contained was an array to XML function. Moved off to
joshtronic/php-array2xml
This commit is contained in:
Josh Sherman 2014-10-17 07:22:15 -04:00
parent ce45dc0dbe
commit ecb075b344
2 changed files with 0 additions and 148 deletions

View file

@ -1,27 +0,0 @@
<?php
class ConvertTest extends PHPUnit_Framework_TestCase
{
/**
* @dataProvider providerArrayToXML
*/
public function testArrayToXML($a, $b, $c)
{
$this->assertEquals(Pickles\Convert::arrayToXML($a, $b), $c);
}
public function providerArrayToXML()
{
return [
['foo', false, ''],
[['foo', 'bar'], false, '<0>foo</0><1>bar</1>'],
[['foo', 'bar'], true, "<0>foo</0>\n<1>bar</1>\n"],
[['foo' => 'bar'], false, '<foo>bar</foo>'],
[['foo' => 'b & r'], false, '<foo><![CDATA[b & r]]></foo>'],
[['children' => ['child' => ['foo', 'bar']]], false, '<children><child>foo</child><child>bar</child></children>'],
[['children' => ['child' => ['foo & bar']]], false, '<children><child><![CDATA[foo & bar]]></child></children>'],
[['children' => ['child' => ['foo', 'bar']]], true, "<children>\n\t<child>foo</child>\n\t<child>bar</child>\n</children>\n"],
];
}
}