src/Codeception/Module/WPDb.php
public function dontHaveTableInDatabase($fullTableName)
    {
        $drop = "DROP TABLE {$fullTableName}";

        try {
            $this->_getDriver()->executeQuery($drop, []);
        } catch (\PDOException $e) {
            if (false === strpos($e->getMessage(), 'table or view not found')) {
                throw $e;
            }
            $this->debug("Table {$fullTableName} not removed from database: it did not exist.");
            return;
        }

        $this->debug("Table {$fullTableName} removed from database.");
    }
public function dontHaveTableInDatabase($fullTableName)
    {
        $drop = "DROP TABLE {$fullTableName}";

        try {
            $this->_getDriver()->executeQuery($drop, []);
        } catch (\PDOException $e) {
            if (false === strpos($e->getMessage(), 'table or view not found')) {
                throw $e;
            }
            $this->debug("Table {$fullTableName} not removed from database: it did not exist.");
            return;
        }

        $this->debug("Table {$fullTableName} removed from database.");
    }
public function dontHaveTableInDatabase ( $ fullTableName ) { $ drop = "DROP TABLE {$fullTableName}" ; try { $ this -> _getDriver ( ) -> executeQuery ( $ drop , [ ] ) ; } catch ( \ PDOException $ e ) { if ( false === strpos ( $ e -> getMessage ( ) , 'table or view not found' ) ) { throw $ e ; } $ this -> debug ( "Table {$fullTableName} not removed from database: it did not exist." ) ; return ; } $ this -> debug ( "Table {$fullTableName} removed from database." ) ; }
Removes a table from the database.
The case where a table does not exist is handled without raising an error.

@example
```php
$ordersTable = $I->grabPrefixedTableNameFor('orders');
$I->dontHaveTableInDatabase($ordersTable);
```

@param string $fullTableName The full table name, including the table prefix.

@throws \Exception If there is an error while dropping the table.
Removes a table from the database . The case where a table does not exist is handled without raising an error .