Example #1
0
 /**
  * @covers Paradox\Client::deleteAQLFunctionsByNamespace
  */
 public function testDeleteAQLFunctionsByNamespace()
 {
     $function = "function () {return 'hello';}";
     $this->client->createAQLFunction("paradoxtest::helloworld", $function);
     $this->client->createAQLFunction("paradoxtest::helloworld2", $function);
     $registered = $this->client->listAQLFunctions("paradoxtest");
     $this->assertCount(2, $registered, "There should be 2 paradoxtest functions");
     $this->assertArrayHasKey("paradoxtest::helloworld", $registered, "The AQL function was not registered");
     $this->assertArrayHasKey("paradoxtest::helloworld2", $registered, "The AQL function was not registered");
     $this->client->deleteAQLFunctionsByNamespace("paradoxtest");
     $registered = $this->client->listAQLFunctions("paradoxtest");
     $this->assertEmpty($registered, "There should be no paradoxtest functions registered");
 }