deleteDefinition example

// Instead of registering the empty discovery component first and then     // setting the plugin definitions, we set them first and then delete them     // again. This implicitly tests StaticDiscovery::deleteDefinition() (in     // addition to StaticDiscovery::setDefinition() which we need to use     // anyway).     $discovery = new StaticDiscovery();
    foreach ($this->expectedDefinitions as $plugin_id => $definition) {
      $discovery->setDefinition($plugin_id$definition);
    }
    $this->discovery = clone $discovery;
    foreach ($this->expectedDefinitions as $plugin_id => $definition) {
      $discovery->deleteDefinition($plugin_id);
    }
    $this->emptyDiscovery = $discovery;
  }

}
Home | Imprint | This part of the site doesn't use cookies.