| @@ 108-125 (lines=18) @@ | ||
| 105 | /** |
|
| 106 | * @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException |
|
| 107 | */ |
|
| 108 | public function testLoadByIdWithoutUrlData() |
|
| 109 | { |
|
| 110 | $id = 1; |
|
| 111 | ||
| 112 | $this->gateway |
|
| 113 | ->expects($this->once()) |
|
| 114 | ->method('loadUrlData') |
|
| 115 | ->with($id) |
|
| 116 | ->willReturn([]); |
|
| 117 | ||
| 118 | $this->mapper |
|
| 119 | ->expects($this->once()) |
|
| 120 | ->method('extractURLsFromRows') |
|
| 121 | ->with([]) |
|
| 122 | ->willReturn([]); |
|
| 123 | ||
| 124 | $this->handler->loadById($id); |
|
| 125 | } |
|
| 126 | ||
| 127 | public function testLoadByIdWithUrlData() |
|
| 128 | { |
|
| @@ 149-166 (lines=18) @@ | ||
| 146 | /** |
|
| 147 | * @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException |
|
| 148 | */ |
|
| 149 | public function testLoadByUrlWithoutUrlData() |
|
| 150 | { |
|
| 151 | $url = 'http://ez.no'; |
|
| 152 | ||
| 153 | $this->gateway |
|
| 154 | ->expects($this->once()) |
|
| 155 | ->method('loadUrlDataByUrl') |
|
| 156 | ->with($url) |
|
| 157 | ->willReturn([]); |
|
| 158 | ||
| 159 | $this->mapper |
|
| 160 | ->expects($this->once()) |
|
| 161 | ->method('extractURLsFromRows') |
|
| 162 | ->with([]) |
|
| 163 | ->willReturn([]); |
|
| 164 | ||
| 165 | $this->handler->loadByUrl($url); |
|
| 166 | } |
|
| 167 | ||
| 168 | public function testLoadByUrlWithUrlData() |
|
| 169 | { |
|