13 private $indexerMock =
null;
25 $collectionMock = $this->createPartialMock(\
Magento\Indexer\Model\Indexer\Collection::class, [
'getItems']);
27 $this->indexerMock = $this->createPartialMock(\
Magento\Indexer\Model\Indexer::class, [
'getStatus']);
29 $urlBuilder = $this->createMock(\
Magento\Framework\UrlInterface::class);
31 $collectionMock->expects($this->any())->method(
'getItems')->with()->willReturn([$this->indexerMock]);
33 $this->model = new \Magento\Indexer\Model\Message\Invalid(
41 $this->indexerMock->expects($this->any())->method(
'getStatus')->with()
44 $this->assertTrue($this->model->isDisplayed());
49 $this->indexerMock->expects($this->any())->method(
'getStatus')->with()
50 ->willReturn(
'Status other than "invalid"');
52 $this->assertFalse($this->model->isDisplayed());