/** * @param int|string $entity * @param int $pkValue * @param string $quoteIntoArguments1 * @param string $quoteIntoArguments2 * @param string $quoteIntoReturn1 * @param string $quoteIntoReturn2 * @param int $callNum * @dataProvider addEntityFilterDataProvider */ public function testAddEntityFilter($entity, $pkValue, $quoteIntoArguments1, $quoteIntoArguments2, $quoteIntoReturn1, $quoteIntoReturn2, $callNum) { $this->readerAdapterMock->expects($this->at(0))->method('quoteInto')->with($quoteIntoArguments1[0], $quoteIntoArguments1[1])->willReturn($quoteIntoReturn1); $this->readerAdapterMock->expects($this->at(1))->method('quoteInto')->with($quoteIntoArguments2[0], $quoteIntoArguments2[1])->willReturn($quoteIntoReturn2); $this->selectMock->expects($this->exactly($callNum))->method('join')->with('review_entity', 'main_table.entity_id=' . 'review_entity' . '.entity_id', ['entity_code']); $this->model->addEntityFilter($entity, $pkValue); }