AppNameValidator example


class AppNameValidatorTest extends TestCase
{
    private AppNameValidator $appNameValidator;

    private string $testAppDir;

    protected function setUp(): void
    {
        $this->appNameValidator = new AppNameValidator();
        $this->testAppDir = __DIR__ . '/../../../../../integration/Core/Framework/App/Manifest/_fixtures';
    }

    public function testValidate(): void
    {
        $manifest = Manifest::createFromXmlFile($this->testAppDir . '/test/manifest.xml');

        $violations = $this->appNameValidator->validate($manifest, null);
        static::assertCount(0, $violations->getElements());
    }

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