public function ConfigFormBaseTraitTest::testConfigFactoryExceptionInvalidProperty in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Form/ConfigFormBaseTraitTest.php \Drupal\Tests\Core\Form\ConfigFormBaseTraitTest::testConfigFactoryExceptionInvalidProperty()
@covers ::config @expectedException \LogicException @expectedExceptionMessage No config factory available for ConfigFormBaseTrait
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ ConfigFormBaseTraitTest.php, line 66 - Contains \Drupal\Tests\Core\Form\ConfigFormBaseTraitTest.
Class
- ConfigFormBaseTraitTest
- @coversDefaultClass \Drupal\Core\Form\ConfigFormBaseTrait @group Form
Namespace
Drupal\Tests\Core\FormCode
public function testConfigFactoryExceptionInvalidProperty() {
$trait = $this
->getMockForTrait('Drupal\\Core\\Form\\ConfigFormBaseTrait');
$trait->configFactory = TRUE;
$config_method = new \ReflectionMethod($trait, 'config');
$config_method
->setAccessible(TRUE);
// There is no config factory available this should result in an exception.
$config_method
->invoke($trait, 'editable.config');
}