Moodle

XMLDB Editor doesn't drop own test tables

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.9.6, 2.0
  • Fix Version/s: 1.9.7, 2.0
  • Component/s: Database SQL/XMLDB
  • Labels:
    None

Description

It seems that the tables created by the XMLDB Editor test aren't dropped ever.

So we need to introduce this at the end of the test action:

/// Finally drop all the potentially existing test tables
        $table = new XMLDBTable('testtable');
        if (table_exists($table)) {
            $status = drop_table($table, true, false);
        }
        $table = new XMLDBTable ('anothertest');
        if (table_exists($table)) {
            $status = drop_table($table, true, false);
        }
        $table = new XMLDBTable ('newnameforthetable');
        if (table_exists($table)) {
            $status = drop_table($table, true, false);
        }

To be done after 1.9.6 release.

Activity

Hide
Petr Škoda (skodak) added a comment -

I suppose we could move all this to DML/DDL tests in 2.0, right?

Show
Petr Škoda (skodak) added a comment - I suppose we could move all this to DML/DDL tests in 2.0, right?
Hide
Eloy Lafuente (stronk7) added a comment -

Well, not really sure... if the XMLDB stuff is being used by other projects... it should have its own tests.

Although that is highly theoretical, of course. Surely other projects will find dml/ddl tests better, uhm... yeah, kill them in 2.0!

Ciao

Show
Eloy Lafuente (stronk7) added a comment - Well, not really sure... if the XMLDB stuff is being used by other projects... it should have its own tests. Although that is highly theoretical, of course. Surely other projects will find dml/ddl tests better, uhm... yeah, kill them in 2.0! Ciao
Hide
Petr Škoda (skodak) added a comment -

hehe, you have already fixed this in 1.9.7 and 2.0, closing

Show
Petr Škoda (skodak) added a comment - hehe, you have already fixed this in 1.9.7 and 2.0, closing

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: