/** * @covers MDB2_Driver_Manager_Common::listTableViews() * @dataProvider provider */ public function testListTableViews($ci) { $this->manualSetUp($ci); if (!$this->nonstd) { $this->markTestSkipped('No Nonstandard Helper for this phptype.'); } $name = 'test_newview'; /* * Have test suite helper functions setup the environment. */ $this->nonstd->dropView($name); $result = $this->nonstd->createView($name, $this->table); $this->checkResultForErrors($result, 'create view helper'); /* * The actual tests. */ $action = 'listTableViews'; $result = $this->db->manager->listTableViews($this->table); $this->checkResultForErrors($result, $action); $this->assertContains($name, $result, "Result of {$action}() does not contain expected value"); $action = 'listTableViews on non-existant table'; $result = $this->db->manager->listTableViews('fake_table'); $this->checkResultForErrors($result, $action); $this->assertNotContains($name, $result, "{$action} should not contain this view"); /* * Have test suite helper functions clean up the environment. */ $result = $this->nonstd->dropView($name); $this->checkResultForErrors($result, 'drop view helper'); }