tests/CmsManager/CmsPageManagerTest.php
/**
     * Test finding an existing container in a page.
     */
Test finding an existing container in a page.
Test finding an existing container in a page .
public function testFindExistingContainer(): void
    {
        $block = new CmsBlock();
        $block->setSettings(['code' => 'findme']);
        $page = new Page();
        $page->addBlocks($block);
        $container = $this->manager->findContainer('findme', $page);
        static::assertSame(
            spl_object_hash($block),
            spl_object_hash($container),
            'should retrieve the block of the page'
        );
    }
public function testFindExistingContainer ( ) : void { $ block = new CmsBlock ( ) ; $ block -> setSettings ( [ 'code' => 'findme' ] ) ; $ page = new Page ( ) ; $ page -> addBlocks ( $ block ) ; $ container = $ this -> manager -> findContainer ( 'findme' , $ page ) ; static :: assertSame ( spl_object_hash ( $ block ) , spl_object_hash ( $ container ) , 'should retrieve the block of the page' ) ; }
Test finding an existing container in a page.
Test finding an existing container in a page .