Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepDiver1975 committed Sep 25, 2018
1 parent 4e5203d commit 10a081f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/Sabre/Xml/ReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,33 @@ function testMappedElement() {

}

function testEmptyProps() {

$input = <<<BLA
<?xml version="1.0"?>
<a:propfind xmlns:a="DAV:">
<a:prop></a:prop>
</a:propfind>
BLA;
$reader = new Reader();
$reader->xml($input);

$reader->next();

$this->assertEquals([
'name' => '{DAV:}propfind',
'value' => [
[
'name' => '{DAV:}prop',
'value' => null,
'attributes' => []
]
],
'attributes' => []
], $reader->parse());

}

/**
* @expectedException \LogicException
*/
Expand Down

0 comments on commit 10a081f

Please sign in to comment.