| @@ 43-60 (lines=18) @@ | ||
| 40 | $this->buildGenerator()->isEmpty(); |
|
| 41 | } |
|
| 42 | ||
| 43 | public function testStartEndObjectElement() |
|
| 44 | { |
|
| 45 | $this->getInnerGeneratorMock() |
|
| 46 | ->expects($this->once()) |
|
| 47 | ->method('startObjectElement') |
|
| 48 | ->with('pertwee', 'doctor'); |
|
| 49 | ||
| 50 | $this->getInnerGeneratorMock() |
|
| 51 | ->expects($this->once()) |
|
| 52 | ->method('endObjectElement') |
|
| 53 | ->with('pertwee'); |
|
| 54 | ||
| 55 | $generator = $this->buildGenerator(); |
|
| 56 | $generator->startObjectElement('jon', 'doctor'); |
|
| 57 | $generator->startObjectElement('pertwee', 'doctor'); |
|
| 58 | $generator->endObjectElement('pertwee'); |
|
| 59 | $generator->endObjectElement('jon'); |
|
| 60 | } |
|
| 61 | ||
| 62 | public function testStartHashElement() |
|
| 63 | { |
|
| @@ 122-139 (lines=18) @@ | ||
| 119 | $this->buildGenerator()->endList('hartnell'); |
|
| 120 | } |
|
| 121 | ||
| 122 | public function testStartEndAttribute() |
|
| 123 | { |
|
| 124 | $this->getInnerGeneratorMock() |
|
| 125 | ->expects($this->once()) |
|
| 126 | ->method('startObjectElement') |
|
| 127 | ->with('eccleston', 'doctor'); |
|
| 128 | ||
| 129 | $this->getInnerGeneratorMock() |
|
| 130 | ->expects($this->once()) |
|
| 131 | ->method('startAttribute') |
|
| 132 | ->with('jacket', 'leather'); |
|
| 133 | ||
| 134 | $generator = $this->buildGenerator(); |
|
| 135 | ||
| 136 | $generator->startObjectElement('smith'); |
|
| 137 | $generator->startObjectElement('eccleston', 'doctor'); |
|
| 138 | $generator->startAttribute('jacket', 'leather'); |
|
| 139 | } |
|
| 140 | ||
| 141 | public function testStartEndAttributeAtRoot() |
|
| 142 | { |
|