Test for the ContextStackTrait.
More...
Test for the ContextStackTrait.
- Copyright
- Copyright (C) 2009-2015 fruux GmbH (https://fruux.com/).
- Author
- Evert Pot (http://evertpot.com/) http://sabre.io/license/ Modified BSD License
Definition at line 12 of file ContextStackTest.php.
◆ setUp()
Sabre\Xml\ContextStackTest::setUp |
( |
| ) |
|
Definition at line 14 of file ContextStackTest.php.
16 $this->stack = $this->getMockForTrait(
'Sabre\\Xml\\ContextStackTrait');
◆ testPushAndPull()
Sabre\Xml\ContextStackTest::testPushAndPull |
( |
| ) |
|
Definition at line 20 of file ContextStackTest.php.
22 $this->stack->contextUri =
'/foo/bar';
23 $this->stack->elementMap[
'{DAV:}foo'] =
'Bar';
24 $this->stack->namespaceMap[
'DAV:'] =
'd';
26 $this->stack->pushContext();
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:']);
32 $this->stack->contextUri =
'/gir/zim';
33 $this->stack->elementMap[
'{DAV:}foo'] =
'newBar';
34 $this->stack->namespaceMap[
'DAV:'] =
'dd';
36 $this->stack->popContext();
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:']);
The documentation for this class was generated from the following file: