38 $this->pageFactory = $this->getMockBuilder(\
Magento\Cms\Model\PageFactory::class)
39 ->disableOriginalConstructor(
true)
40 ->setMethods([
'create'])
44 ->disableOriginalConstructor(
true)
47 $this->page = $this->getMockBuilder(\
Magento\Cms\Model\Page::class)
48 ->disableOriginalConstructor()
49 ->setMethods([
'setStoreId',
'getId'])
52 $this->getPageByIdentifierCommand =
new GetPageByIdentifier($this->pageFactory, $this->pageResource);
63 $this->pageFactory->expects($this->once())
65 ->willReturn($this->page);
67 $this->page->expects($this->once())
68 ->method(
'setStoreId')
69 ->willReturn($this->page);
71 $this->page->expects($this->once())
75 $this->pageResource->expects($this->once())
77 ->with($this->page, $identifier)
78 ->willReturn($this->page);
80 $this->getPageByIdentifierCommand->execute($identifier,
$storeId);
$getPageByIdentifierCommand