public function testGetAvailableInCategories()
 {
     $this->assertEquals([], $this->_model->getAvailableInCategories());
     $this->_model->load(4);
     // fixture
     $actualCategoryIds = $this->_model->getAvailableInCategories();
     sort($actualCategoryIds);
     // not depend on the order of items
     $this->assertEquals([2, 10, 11, 12], $actualCategoryIds);
     //Check not visible product
     $this->_model->load(3);
     $this->assertEmpty($this->_model->getAvailableInCategories());
 }
 public function testGetAvailableInCategories()
 {
     $this->assertEquals([], $this->_model->getAvailableInCategories());
     $this->_model->load($this->productRepository->get('simple-4')->getId());
     // fixture
     $actualCategoryIds = $this->_model->getAvailableInCategories();
     sort($actualCategoryIds);
     // not depend on the order of items
     $this->assertEquals([10, 11, 12, 13], $actualCategoryIds);
     //Check not visible product
     $this->_model->load($this->productRepository->get('simple-3')->getId());
     $this->assertEmpty($this->_model->getAvailableInCategories());
 }
 /**
  * {@inheritdoc}
  */
 public function getAvailableInCategories()
 {
     $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getAvailableInCategories');
     if (!$pluginInfo) {
         return parent::getAvailableInCategories();
     } else {
         return $this->___callPlugins('getAvailableInCategories', func_get_args(), $pluginInfo);
     }
 }