コード例 #1
0
 function setUp()
 {
     parent::setUp();
     ob_start();
     $this->create_current_tables();
     // we need current tables for Plugins to work
     ob_end_clean();
     $this->Plugins = new Plugins_admin();
 }
コード例 #2
0
 /**
  * General after-install checks.
  */
 function tearDown()
 {
     // Test if item types (which get installed for Phoenix-Alpha) are present:
     // fp> What is this test good for?
     $this->assertEqual($this->test_DB->get_var('SELECT ptyp_name FROM T_items__type ORDER BY ptyp_ID'), 'Post');
     // Check if all basic plugins have been installed.
     $installed_plugins = $this->test_DB->get_col('SELECT plug_classname FROM T_plugins ORDER BY plug_classname ASC');
     // Make sure it's sorted in the same way.
     sort($installed_plugins);
     sort($this->basic_plugins);
     if (!$this->assertFalse(array_diff($this->basic_plugins, $installed_plugins))) {
         echo 'Missing plugins: ' . implode(', ', array_diff($this->basic_plugins, $installed_plugins)) . "<br />\n";
         echo 'Installed, but unexpected plugins: ' . implode(', ', array_diff($installed_plugins, $this->basic_plugins)) . "<br />\n";
     }
     parent::tearDown();
 }
コード例 #3
0
 function __construct()
 {
     parent::__construct('Upgrade funcs tests');
     /* exclude defaults: */
     $this->exclude_defaults = array('drop_column', 'drop_index');
 }