Ejemplo n.º 1
0
 /**
  * @covers MDB2_Driver_Manager_Common::listFunctions()
  * @dataProvider provider
  */
 public function testFunctionActions($ci)
 {
     $this->manualSetUp($ci);
     if (!$this->nonstd) {
         $this->markTestSkipped('No Nonstandard Helper for this phptype.');
     }
     $name = 'test_add';
     /*
      * Have test suite helper functions setup the environment.
      */
     $this->nonstd->dropFunction($name);
     $this->db->pushErrorHandling(PEAR_ERROR_RETURN);
     $this->db->expectError('*');
     $result = $this->nonstd->createFunction($name);
     $this->db->popExpect();
     $this->db->popErrorHandling();
     $this->checkResultForErrors($result, 'crete function helper');
     /*
      * The actual tests.
      */
     $action = 'listFunctions';
     $result = $this->db->manager->listFunctions();
     $this->checkResultForErrors($result, $action);
     $this->assertContains($name, $result, "Result of {$action}() does not contain expected value");
     /*
      * Have test suite helper functions clean up the environment.
      */
     $result = $this->nonstd->dropFunction($name);
     $this->checkResultForErrors($result, 'drop function helper');
 }