ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
Sabre\Xml\ContextStackTest Class Reference

Test for the ContextStackTrait. More...

+ Inheritance diagram for Sabre\Xml\ContextStackTest:
+ Collaboration diagram for Sabre\Xml\ContextStackTest:

Public Member Functions

 setUp ()
 
 testPushAndPull ()
 

Detailed Description

Test for the ContextStackTrait.

Author
Evert Pot (http://evertpot.com/) @license http://sabre.io/license/ Modified BSD License

Definition at line 12 of file ContextStackTest.php.

Member Function Documentation

◆ setUp()

Sabre\Xml\ContextStackTest::setUp ( )

Definition at line 14 of file ContextStackTest.php.

14 {
15
16 $this->stack = $this->getMockForTrait('Sabre\\Xml\\ContextStackTrait');
17
18 }

◆ testPushAndPull()

Sabre\Xml\ContextStackTest::testPushAndPull ( )

Definition at line 20 of file ContextStackTest.php.

20 {
21
22 $this->stack->contextUri = '/foo/bar';
23 $this->stack->elementMap['{DAV:}foo'] = 'Bar';
24 $this->stack->namespaceMap['DAV:'] = 'd';
25
26 $this->stack->pushContext();
27
28 $this->assertEquals('/foo/bar', $this->stack->contextUri);
29 $this->assertEquals('Bar', $this->stack->elementMap['{DAV:}foo']);
30 $this->assertEquals('d', $this->stack->namespaceMap['DAV:']);
31
32 $this->stack->contextUri = '/gir/zim';
33 $this->stack->elementMap['{DAV:}foo'] = 'newBar';
34 $this->stack->namespaceMap['DAV:'] = 'dd';
35
36 $this->stack->popContext();
37
38 $this->assertEquals('/foo/bar', $this->stack->contextUri);
39 $this->assertEquals('Bar', $this->stack->elementMap['{DAV:}foo']);
40 $this->assertEquals('d', $this->stack->namespaceMap['DAV:']);
41
42 }

The documentation for this class was generated from the following file: