/**
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessage Invalid function : {"UNKNOWN_PROPERTY":"UNKNOWN_VALUE"}
  */
 public function testErlangFunctionInvalidArgumentException()
 {
     ErlangFunction::createFromArray(['UNKNOWN_PROPERTY' => 'UNKNOWN_VALUE']);
 }
 /**
  * @param array $hooks
  *
  * @return array
  */
 private function parseHooks(array $hooks)
 {
     $list = [];
     foreach ($hooks as $func) {
         if (isset($func['name'])) {
             $list[] = NamedJsFunction::createFromArray($func);
             continue;
         }
         $list[] = ErlangFunction::createFromArray($func);
     }
     return $list;
 }