public function testGetFileContents() { $binaryFile = new BinaryFile(); $contents = 'some contents'; $this->publishedIoServiceMock->expects($this->once())->method('getFileContents')->with($binaryFile)->will($this->returnValue($contents)); $this->draftIoServiceMock->expects($this->never())->method('getFileContents'); self::assertSame($contents, $this->service->getFileContents($binaryFile)); }