TypeResolverTest.php

Same filename and directory in other branches
  1. 10 core/tests/Drupal/Tests/Core/Config/TypeResolverTest.php

Namespace

Drupal\Tests\Core\Config

File

core/tests/Drupal/Tests/Core/Config/TypeResolverTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\Core\Config;

use Drupal\Core\Config\Schema\TypeResolver;
use Drupal\Tests\UnitTestCase;
use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\Attributes\Group;
use PHPUnit\Framework\Attributes\TestWith;

/**
 * Tests Drupal\Core\Config\Schema\TypeResolver.
 */
class TypeResolverTest extends UnitTestCase {
  
  /**
   * Tests invalid type.
   */
  public function testInvalidType(string $name, string $message, array $data = []) : void {
    $this->expectException(\LogicException::class);
    $this->expectExceptionMessage($message);
    TypeResolver::resolveDynamicTypeName($name, $data);
  }

}

Classes

Title Deprecated Summary
TypeResolverTest Tests Drupal\Core\Config\Schema\TypeResolver.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.