diff options
Diffstat (limited to 'tests/PHPUnit/Core/SqlTest.php')
-rwxr-xr-x | tests/PHPUnit/Core/SqlTest.php | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/tests/PHPUnit/Core/SqlTest.php b/tests/PHPUnit/Core/SqlTest.php index 48c64b2cf5..14aebbf22c 100755 --- a/tests/PHPUnit/Core/SqlTest.php +++ b/tests/PHPUnit/Core/SqlTest.php @@ -7,37 +7,37 @@ */ class SqlTest extends DatabaseTestCase { - public function setUp() - { - parent::setUp(); - - // create two myisam tables - Piwik_Exec("CREATE TABLE table1 (a INT) ENGINE=MYISAM"); - Piwik_Exec("CREATE TABLE table2 (b INT) ENGINE=MYISAM"); - - // create two innodb tables - Piwik_Exec("CREATE TABLE table3 (c INT) ENGINE=InnoDB"); - Piwik_Exec("CREATE TABLE table4 (d INT) ENGINE=InnoDB"); - } - - public function tearDown() - { - parent::tearDown(); - } - + public function setUp() + { + parent::setUp(); + + // create two myisam tables + Piwik_Exec("CREATE TABLE table1 (a INT) ENGINE=MYISAM"); + Piwik_Exec("CREATE TABLE table2 (b INT) ENGINE=MYISAM"); + + // create two innodb tables + Piwik_Exec("CREATE TABLE table3 (c INT) ENGINE=InnoDB"); + Piwik_Exec("CREATE TABLE table4 (d INT) ENGINE=InnoDB"); + } + + public function tearDown() + { + parent::tearDown(); + } + /** * @group Core * @group Unzip */ public function testOptimize() { - // make sure optimizing myisam tables works - $this->assertTrue(Piwik_OptimizeTables(array('table1', 'table2')) !== false); - - // make sure optimizing both myisam & innodb results in optimizations - $this->assertTrue(Piwik_OptimizeTables(array('table1', 'table2', 'table3', 'table4')) !== false); - - // make sure innodb tables are skipped - $this->assertTrue(Piwik_OptimizeTables(array('table3', 'table4')) === false); + // make sure optimizing myisam tables works + $this->assertTrue(Piwik_OptimizeTables(array('table1', 'table2')) !== false); + + // make sure optimizing both myisam & innodb results in optimizations + $this->assertTrue(Piwik_OptimizeTables(array('table1', 'table2', 'table3', 'table4')) !== false); + + // make sure innodb tables are skipped + $this->assertTrue(Piwik_OptimizeTables(array('table3', 'table4')) === false); } } |