Completed
Push — master ( 298f36...c6c82d )
by Mihail
06:19 queued 10s
created

XmlSerializerFunctionsTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 26
rs 10
wmc 3
1
<?php
2
3
namespace Koded\Stdlib;
4
5
use Koded\Stdlib\Serializer\XmlSerializerTest;
6
use PHPUnit\Framework\TestCase;
7
8
class XmlSerializerFunctionsTest extends TestCase
9
{
10
11
    public function test_serialize_to_xml()
12
    {
13
        $this->markTestSkipped();
14
15
        $this->assertXmlStringEqualsXmlFile(
16
            XmlSerializerTest::XML_FILE,
17
            xml_serialize('payload', require XmlSerializerTest::PHP_FILE)
18
        );
19
    }
20
21
    public function test_unserialize()
22
    {
23
        $this->markTestSkipped();
24
25
        $this->assertEquals(
26
            require XmlSerializerTest::PHP_FILE,
27
            xml_unserialize('payload', file_get_contents(XmlSerializerTest::XML_FILE))
28
        );
29
    }
30
31
    public function test_unserialize_error_should_return_empty_array()
32
    {
33
        $this->assertSame([], xml_unserialize('', ''));
34
    }
35
}
36