assertContainsInstanceOf example

/** * @dataProvider provideEntityClasses */
    public function testCmsEntityIsVersionable(string $entityDefinitionClass): void
    {
        /** @var EntityDefinition $definition */
        $definition = $this->getContainer()->get($entityDefinitionClass);

        static::assertTrue($definition->getFields()->has('versionId'));
        static::assertTrue($definition->isVersionAware());
        self::assertContainsInstanceOf(VersionField::class$definition->getFields());
    }

    /** * @dataProvider provideEntityClasses */
    public function testCmsRepositoryLoadsData(string $entityDefinitionClass): void
    {
        $definition = $this->getContainer()->get($entityDefinitionClass);
        $repository = $this->getContainer()->get($definition->getEntityName() . '.repository');
        $result = $repository->search(new Criteria(), Context::createDefaultContext());

        
Home | Imprint | This part of the site doesn't use cookies.