/**
  * @param array $array
  * @return $this
  * @SuppressWarnings(PHPMD.StaticAccess)
  */
 protected function fromArray(array $array)
 {
     if (array_key_exists('workerModules', $array) && is_array($array['workerModules'])) {
         foreach ($array['workerModules'] as $name => $module) {
             $this->workerModules[$name] = WorkerModuleDefinition::fromArray($module);
         }
     }
     return $this;
 }
 /**
  * @test
  * @covers ::lookupDescription
  * @expectedException \RuntimeException
  * @expectedExceptionMessage No description could be found matching name/anything
  */
 public function testLookupDescriptionException()
 {
     $descriptions = ['description' => 'no aliases'];
     $module = new WorkerModuleDefinition('name', [], $descriptions);
     $module->lookupDescription('anything');
 }