public function ConfigFormBaseTraitTest::testConfigFactoryException 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::testConfigFactoryException()
@covers ::config @expectedException \LogicException @expectedExceptionMessage No config factory available for ConfigFormBaseTrait
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ ConfigFormBaseTraitTest.php, line 52 - Contains \Drupal\Tests\Core\Form\ConfigFormBaseTraitTest.
Class
- ConfigFormBaseTraitTest
- @coversDefaultClass \Drupal\Core\Form\ConfigFormBaseTrait @group Form
Namespace
Drupal\Tests\Core\FormCode
public function testConfigFactoryException() {
$trait = $this
->getMockForTrait('Drupal\\Core\\Form\\ConfigFormBaseTrait');
$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');
}