コード例 #1
0
 /**
  * @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([]));
 }
コード例 #2
0
 /**
  * @dataProvider getIdsMatchingTagsDataProvider
  */
 public function testGetIdsMatchingTags($searchTags, $expectedIds)
 {
     $this->_prepareCollection();
     $actualIds = $this->_model->getIdsMatchingTags($searchTags);
     $this->assertEquals($expectedIds, $actualIds);
 }