/** * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingTags * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsNotMatchingTags * @covers \Magento\Framework\Cache\Backend\MongoDb::getIdsMatchingAnyTags */ public function testGetIdsMatchingTagsNoInputTags() { $this->_collection->expects($this->never())->method('find'); $this->assertEquals([], $this->_model->getIdsMatchingTags([])); $this->assertEquals([], $this->_model->getIdsNotMatchingTags([])); $this->assertEquals([], $this->_model->getIdsMatchingAnyTags([])); }
/** * @dataProvider getIdsMatchingAnyTagsDataProvider */ public function testGetIdsMatchingAnyTags($searchTags, $expectedIds) { $this->_prepareCollection(); $actualIds = $this->_model->getIdsMatchingAnyTags($searchTags); $this->assertEquals($expectedIds, $actualIds); }