tests/CmsManager/CmsPageManagerTest.php
/**
     * Test get Page method with url return Page.
     */
Test get Page method with url return Page.
Test get Page method with url return Page .
public function testGetPageWithoutParam(): void
    {
        $pageManager = $this->createMock(PageManagerInterface::class);
        $pageManager->method('findOneBy')->willReturn(new Page());
        $this->blockInteractor->method('loadPageBlocks')->willReturn([]);
        $manager = $this->createManager($pageManager, $this->blockInteractor);
        $manager->setCurrentPage(new Page());
        $page = null;
        $site = new Site();
        static::assertInstanceOf(PageInterface::class, $manager->getPage($site, $page));
    }
public function testGetPageWithoutParam ( ) : void { $ pageManager = $ this -> createMock ( PageManagerInterface :: class ) ; $ pageManager -> method ( 'findOneBy' ) -> willReturn ( new Page ( ) ) ; $ this -> blockInteractor -> method ( 'loadPageBlocks' ) -> willReturn ( [ ] ) ; $ manager = $ this -> createManager ( $ pageManager , $ this -> blockInteractor ) ; $ manager -> setCurrentPage ( new Page ( ) ) ; $ page = null ; $ site = new Site ( ) ; static :: assertInstanceOf ( PageInterface :: class , $ manager -> getPage ( $ site , $ page ) ) ; }
Test get Page method with url return Page.
Test get Page method with url return Page .