Added auth test, cleaned up directory
This commit is contained in:
parent
a866a1a61b
commit
e45e1251e1
25 changed files with 134 additions and 15 deletions
|
@ -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"],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue