1<?php
2
3namespace Sabre\DAV\Exception;
4
5use
6    Sabre\DAV,
7    DOMDocument;
8
9class TooManyMatchesTest extends \PHPUnit_Framework_TestCase {
10
11    function testSerialize() {
12
13        $dom = new DOMDocument('1.0');
14        $dom->formatOutput = true;
15        $root = $dom->createElement('d:root');
16
17        $dom->appendChild($root);
18        $root->setAttribute('xmlns:d','DAV:');
19
20        $locked = new TooManyMatches();
21
22        $locked->serialize(new DAV\Server(), $root);
23
24        $output = $dom->saveXML();
25
26        $expected = '<?xml version="1.0"?>
27<d:root xmlns:d="DAV:">
28  <d:number-of-matches-within-limits xmlns:d="DAV:"/>
29</d:root>
30';
31
32        $this->assertEquals($expected, $output);
33
34    }
35
36}
37