|
@@ 619-632 (lines=14) @@
|
| 616 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::load |
| 617 |
|
* @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException |
| 618 |
|
*/ |
| 619 |
|
public function testLoadErrorNotFound() |
| 620 |
|
{ |
| 621 |
|
$handler = $this->getContentHandler(); |
| 622 |
|
|
| 623 |
|
$gatewayMock = $this->getGatewayMock(); |
| 624 |
|
|
| 625 |
|
$gatewayMock->expects($this->once()) |
| 626 |
|
->method('load') |
| 627 |
|
->will( |
| 628 |
|
$this->returnValue(array()) |
| 629 |
|
); |
| 630 |
|
|
| 631 |
|
$result = $handler->load(23, 2, array('eng-GB')); |
| 632 |
|
} |
| 633 |
|
|
| 634 |
|
/** |
| 635 |
|
* Returns a Content for {@link testCreateDraftFromVersion()}. |
|
@@ 1451-1462 (lines=12) @@
|
| 1448 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::copy |
| 1449 |
|
* @expectedException \eZ\Publish\Core\Base\Exceptions\NotFoundException |
| 1450 |
|
*/ |
| 1451 |
|
public function testCopyThrowsNotFoundExceptionVersionNotFound() |
| 1452 |
|
{ |
| 1453 |
|
$handler = $this->getContentHandler(); |
| 1454 |
|
|
| 1455 |
|
$gatewayMock = $this->getGatewayMock(); |
| 1456 |
|
$gatewayMock->expects($this->once()) |
| 1457 |
|
->method('load') |
| 1458 |
|
->with($this->equalTo(23, 32)) |
| 1459 |
|
->will($this->returnValue(array())); |
| 1460 |
|
|
| 1461 |
|
$result = $handler->copy(23, 32); |
| 1462 |
|
} |
| 1463 |
|
|
| 1464 |
|
/** |
| 1465 |
|
* @covers \eZ\Publish\Core\Persistence\Legacy\Content\Handler::setStatus |