function SchemaCompatibilityCheckerTest::testIsCompatible
Same name in this branch
- 10 core/modules/sdc/tests/src/Unit/SchemaCompatibilityCheckerTest.php \Drupal\Tests\sdc\Unit\SchemaCompatibilityCheckerTest::testIsCompatible()
Same name in other branches
- 11.x core/modules/sdc/tests/src/Unit/SchemaCompatibilityCheckerTest.php \Drupal\Tests\sdc\Unit\SchemaCompatibilityCheckerTest::testIsCompatible()
- 11.x core/tests/Drupal/Tests/Core/Theme/Component/SchemaCompatibilityCheckerTest.php \Drupal\Tests\Core\Theme\Component\SchemaCompatibilityCheckerTest::testIsCompatible()
@covers ::isCompatible @dataProvider dataProviderIsCompatible
File
-
core/
tests/ Drupal/ Tests/ Core/ Theme/ Component/ SchemaCompatibilityCheckerTest.php, line 34
Class
- SchemaCompatibilityCheckerTest
- @coversDefaultClass \Drupal\Core\Theme\Component\SchemaCompatibilityChecker @group sdc
Namespace
Drupal\Tests\Core\Theme\ComponentCode
public function testIsCompatible(array $first_schema, array $second_schema, bool $expected) : void {
try {
$this->checker
->isCompatible($first_schema, $second_schema);
$is_compatible = TRUE;
} catch (IncompatibleComponentSchema $e) {
$is_compatible = FALSE;
}
$this->assertSame($expected, $is_compatible);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.