|
@@ 551-564 (lines=14) @@
|
| 548 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::load |
| 549 |
|
* @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException |
| 550 |
|
*/ |
| 551 |
|
public function testLoadErrorNotFound() |
| 552 |
|
{ |
| 553 |
|
$handler = $this->getContentHandler(); |
| 554 |
|
|
| 555 |
|
$gatewayMock = $this->getGatewayMock(); |
| 556 |
|
|
| 557 |
|
$gatewayMock->expects($this->once()) |
| 558 |
|
->method('load') |
| 559 |
|
->will( |
| 560 |
|
$this->returnValue(array()) |
| 561 |
|
); |
| 562 |
|
|
| 563 |
|
$result = $handler->load(23, 2, array('eng-GB')); |
| 564 |
|
} |
| 565 |
|
|
| 566 |
|
/** |
| 567 |
|
* Returns a Content for {@link testCreateDraftFromVersion()}. |
|
@@ 1380-1391 (lines=12) @@
|
| 1377 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::copy |
| 1378 |
|
* @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException |
| 1379 |
|
*/ |
| 1380 |
|
public function testCopyThrowsNotFoundExceptionVersionNotFound() |
| 1381 |
|
{ |
| 1382 |
|
$handler = $this->getContentHandler(); |
| 1383 |
|
|
| 1384 |
|
$gatewayMock = $this->getGatewayMock(); |
| 1385 |
|
$gatewayMock->expects($this->once()) |
| 1386 |
|
->method('load') |
| 1387 |
|
->with($this->equalTo(23, 32)) |
| 1388 |
|
->will($this->returnValue(array())); |
| 1389 |
|
|
| 1390 |
|
$result = $handler->copy(23, 32); |
| 1391 |
|
} |
| 1392 |
|
|
| 1393 |
|
/** |
| 1394 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::setStatus |