getTemplatePriority example

/** * @internal * * @coversDefaultClass \Shopware\Administration\Administration */
class AdministrationTest extends TestCase
{
    public function testTemplatePriority(): void
    {
        $administration = new Administration();

        static::assertEquals(-1, $administration->getTemplatePriority());
    }
}
continue;
            }

            $bundlePath = $bundle->getPath();

            $directory = $bundlePath . '/Resources/views';

            if (!file_exists($directory)) {
                continue;
            }

            $bundles[$bundle->getName()] = $bundle->getTemplatePriority();
        }

        $bundles = array_reverse($bundles);
        $apps = $this->getAppTemplateNamespaces();

        /** @var array<int, array<string, mixed>> $combinedApps */
        $combinedApps = array_combine(array_keys($apps)array_column($apps, 'template_load_priority'));

        $extensions = array_merge($combinedApps$bundles);
        asort($extensions);

        
/** * @internal * * @coversDefaultClass \Shopware\Core\Framework\Framework */
class FrameworkTest extends TestCase
{
    public function testTemplatePriority(): void
    {
        $framework = new Framework();

        static::assertEquals(-1, $framework->getTemplatePriority());
    }
}
/** * @internal * * @covers \Shopware\Elasticsearch\Elasticsearch */
class ElasticsearchTest extends TestCase
{
    public function testTemplatePriority(): void
    {
        $elasticsearch = new Elasticsearch();

        static::assertEquals(-1, $elasticsearch->getTemplatePriority());
    }

    public function testBundle(): void
    {
        $container = new ContainerBuilder();
        $container->setParameter('kernel.environment', 'prod');

        $framework = new FrameworkBundle();
        $frameworkExtension = $framework->getContainerExtension();
        static::assertNotNull($frameworkExtension);
        $container->registerExtension($frameworkExtension);

        
/** * @internal * * @covers \Shopware\Core\Profiling\Profiling */
class ProfilingTest extends TestCase
{
    public function testTemplatePriority(): void
    {
        $profiling = new Profiling();

        static::assertEquals(-2, $profiling->getTemplatePriority());
    }
}
/** * @internal * * @covers \Shopware\Core\System\System */
class SystemTest extends TestCase
{
    public function testTemplatePriority(): void
    {
        $system = new System();

        static::assertEquals(-1, $system->getTemplatePriority());
    }
}
Home | Imprint | This part of the site doesn't use cookies.