|
@@ 543-556 (lines=14) @@
|
| 540 |
|
* @covers eZ\Publish\Core\Persistence\Legacy\Content\Handler::load |
| 541 |
|
* @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException |
| 542 |
|
*/ |
| 543 |
|
public function testLoadErrorNotFound() |
| 544 |
|
{ |
| 545 |
|
$handler = $this->getContentHandler(); |
| 546 |
|
|
| 547 |
|
$gatewayMock = $this->getGatewayMock(); |
| 548 |
|
|
| 549 |
|
$gatewayMock->expects($this->once()) |
| 550 |
|
->method('load') |
| 551 |
|
->will( |
| 552 |
|
$this->returnValue(array()) |
| 553 |
|
); |
| 554 |
|
|
| 555 |
|
$result = $handler->load(23, 2, array('eng-GB')); |
| 556 |
|
} |
| 557 |
|
|
| 558 |
|
/** |
| 559 |
|
* Returns a Content for {@link testCreateDraftFromVersion()}. |
|
@@ 1372-1383 (lines=12) @@
|
| 1369 |
|
* @covers eZ\Publish\Core\Persistence\Legacy\Content\Handler::copy |
| 1370 |
|
* @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException |
| 1371 |
|
*/ |
| 1372 |
|
public function testCopyThrowsNotFoundExceptionVersionNotFound() |
| 1373 |
|
{ |
| 1374 |
|
$handler = $this->getContentHandler(); |
| 1375 |
|
|
| 1376 |
|
$gatewayMock = $this->getGatewayMock(); |
| 1377 |
|
$gatewayMock->expects($this->once()) |
| 1378 |
|
->method('load') |
| 1379 |
|
->with($this->equalTo(23, 32)) |
| 1380 |
|
->will($this->returnValue(array())); |
| 1381 |
|
|
| 1382 |
|
$result = $handler->copy(23, 32); |
| 1383 |
|
} |
| 1384 |
|
|
| 1385 |
|
/** |
| 1386 |
|
* @covers eZ\Publish\Core\Persistence\Legacy\Content\Handler::setStatus |