public function FormStateTest::testLoadIncludeAlreadyLoaded in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Form/FormStateTest.php \Drupal\Tests\Core\Form\FormStateTest::testLoadIncludeAlreadyLoaded()
@covers ::loadInclude
File
- core/
tests/ Drupal/ Tests/ Core/ Form/ FormStateTest.php, line 228 - Contains \Drupal\Tests\Core\Form\FormStateTest.
Class
- FormStateTest
- @coversDefaultClass \Drupal\Core\Form\FormState
Namespace
Drupal\Tests\Core\FormCode
public function testLoadIncludeAlreadyLoaded() {
$type = 'some_type';
$module = 'some_module';
$name = 'some_name';
$form_state = $this
->getMockBuilder('Drupal\\Core\\Form\\FormState')
->setMethods([
'moduleLoadInclude',
])
->getMock();
$form_state
->addBuildInfo('files', [
'some_module:some_name.some_type' => [
'type' => $type,
'module' => $module,
'name' => $name,
],
]);
$form_state
->expects($this
->never())
->method('moduleLoadInclude');
$this
->assertFalse($form_state
->loadInclude($module, $type, $name));
}