| @@ 1050-1073 (lines=24) @@ | ||
| 1047 | /** |
|
| 1048 | * @return \eZ\Publish\Core\Persistence\FieldTypeRegistry|\PHPUnit_Framework_MockObject_MockObject |
|
| 1049 | */ |
|
| 1050 | protected function getFieldTypeRegistryMock() |
|
| 1051 | { |
|
| 1052 | if (!isset($this->fieldTypeRegistryMock)) { |
|
| 1053 | $this->fieldTypeRegistryMock = $this->getMock( |
|
| 1054 | 'eZ\\Publish\\Core\\Persistence\\FieldTypeRegistry', |
|
| 1055 | array(), |
|
| 1056 | array(), |
|
| 1057 | '', |
|
| 1058 | false |
|
| 1059 | ); |
|
| 1060 | ||
| 1061 | $this->fieldTypeRegistryMock->expects( |
|
| 1062 | $this->any() |
|
| 1063 | )->method( |
|
| 1064 | 'getFieldType' |
|
| 1065 | )->with( |
|
| 1066 | $this->isType('string') |
|
| 1067 | )->will( |
|
| 1068 | $this->returnValue($this->getFieldTypeMock()) |
|
| 1069 | ); |
|
| 1070 | } |
|
| 1071 | ||
| 1072 | return $this->fieldTypeRegistryMock; |
|
| 1073 | } |
|
| 1074 | ||
| 1075 | /** |
|
| 1076 | * @return \eZ\Publish\SPI\FieldType\FieldType|\PHPUnit_Framework_MockObject_MockObject |
|
| @@ 62-80 (lines=19) @@ | ||
| 59 | * |
|
| 60 | * @return \eZ\Publish\Core\REST\Common\Output\Visitor|\PHPUnit_Framework_MockObject_MockObject |
|
| 61 | */ |
|
| 62 | protected function getVisitorMock() |
|
| 63 | { |
|
| 64 | if (!isset($this->visitorMock)) { |
|
| 65 | $this->visitorMock = $this->getMock( |
|
| 66 | '\\eZ\\Publish\\Core\\REST\\Common\\Output\\Visitor', |
|
| 67 | array(), |
|
| 68 | array(), |
|
| 69 | '', |
|
| 70 | false |
|
| 71 | ); |
|
| 72 | ||
| 73 | $this->visitorMock |
|
| 74 | ->expects($this->any()) |
|
| 75 | ->method('getResponse') |
|
| 76 | ->will($this->returnValue($this->getResponseMock())); |
|
| 77 | } |
|
| 78 | ||
| 79 | return $this->visitorMock; |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * @return \Symfony\Component\HttpFoundation\Response|\PHPUnit_Framework_MockObject_MockObject |
|