Beispiel #1
0
 /**
  * @param int|null $storeId
  * @param bool $result
  * @dataProvider isAvailableOnStoreDataProvider
  */
 public function testIsAvailableOnStore($storeId, $result)
 {
     $store = $this->getMock('Magento\\Store\\Model\\Store', [], [], '', false);
     if ($storeId) {
         $store->expects($this->once())->method('getId')->will($this->returnValue($storeId));
         $this->storeManagerMock->expects($this->once())->method('getStore')->with($this->equalTo($store))->will($this->returnValue($store));
     }
     $this->assertSame($result, $this->review->isAvailableOnStore($store));
 }