getModuleAndPath example


  protected $definition;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    // getModuleAndPath() returns an array of the module name and directory.     [$module_name$module_dir] = $this->getModuleAndPath();

    $namespaces = new \ArrayObject();
    $namespaces["Drupal\\$module_name"] = $module_dir . '/src';

    $module_handler = $this->createMock('Drupal\Core\Extension\ModuleHandlerInterface');
    $module_handler->expects($this->once())
      ->method('moduleExists')
      ->with($module_name)
      ->willReturn(TRUE);
    $typed_data_manager = $this->createMock(TypedDataManagerInterface::class);
    $plugin_manager = new FieldTypePluginManager(
      
Home | Imprint | This part of the site doesn't use cookies.