AppAdministrationSnippetCollection example


        $repository = $this->createMock(EntityRepository::class);

        $appSnippets = [];
        foreach ($snippetsFromApp as $snippet) {
            $appSnippet = new AppAdministrationSnippetEntity();
            $appSnippet->assign($snippet);

            $appSnippets[] = $appSnippet;
        }

        $collection = new AppAdministrationSnippetCollection($appSnippets);
        $entitySearchResult = new EntitySearchResult(
            AppAdministrationSnippetDefinition::ENTITY_NAME,
            $collection->count(),
            $collection,
            null,
            new Criteria(),
            Context::createDefaultContext()
        );

        $repository
            ->method('search')
            
Home | Imprint | This part of the site doesn't use cookies.