/** * Set common expectations * * @param bool $isLoaded * @param int $amount * @param array $collectionArray * @return void */ protected function setCommonExpectations($isLoaded, $amount, array $collectionArray) { $this->collectionMock->expects($this->once())->method('isLoaded')->willReturn($isLoaded); $this->collectionMock->expects($this->once())->method('toArray')->willReturn($collectionArray); $this->collectionMock->expects($this->once())->method('getSize')->willReturn($amount); }