object = new Innodb('innodb'); } /** * Tears down the fixture, for example, closes a network connection. * This method is called after a test is executed. * * @access protected * @return void */ protected function tearDown() { unset($this->object); } /** * Test for getVariables * * @return void */ public function testGetVariables() { $this->assertEquals( array( 'innodb_data_home_dir' => array( 'title' => __('Data home directory'), 'desc' => __('The common part of the directory path for all InnoDB data files.'), ), 'innodb_data_file_path' => array( 'title' => __('Data files'), ), 'innodb_autoextend_increment' => array( 'title' => __('Autoextend increment'), 'desc' => __('The increment size for extending the size of an autoextending tablespace when it becomes full.'), 'type' => 2, ), 'innodb_buffer_pool_size' => array( 'title' => __('Buffer pool size'), 'desc' => __('The size of the memory buffer InnoDB uses to cache data and indexes of its tables.'), 'type' => 1, ), 'innodb_additional_mem_pool_size' => array( 'title' => 'innodb_additional_mem_pool_size', 'type' => 1, ), 'innodb_buffer_pool_awe_mem_mb' => array( 'type' => 1, ), 'innodb_checksums' => array( ), 'innodb_commit_concurrency' => array( ), 'innodb_concurrency_tickets' => array( 'type' => 2, ), 'innodb_doublewrite' => array( ), 'innodb_fast_shutdown' => array( ), 'innodb_file_io_threads' => array( 'type' => 2, ), 'innodb_file_per_table' => array( ), 'innodb_flush_log_at_trx_commit' => array( ), 'innodb_flush_method' => array( ), 'innodb_force_recovery' => array( ), 'innodb_lock_wait_timeout' => array( 'type' => 2, ), 'innodb_locks_unsafe_for_binlog' => array( ), 'innodb_log_arch_dir' => array( ), 'innodb_log_archive' => array( ), 'innodb_log_buffer_size' => array( 'type' => 1, ), 'innodb_log_file_size' => array( 'type' => 1, ), 'innodb_log_files_in_group' => array( 'type' => 2, ), 'innodb_log_group_home_dir' => array( ), 'innodb_max_dirty_pages_pct' => array( 'type' => 2, ), 'innodb_max_purge_lag' => array( ), 'innodb_mirrored_log_groups' => array( 'type' => 2, ), 'innodb_open_files' => array( 'type' => 2, ), 'innodb_support_xa' => array( ), 'innodb_sync_spin_loops' => array( 'type' => 2, ), 'innodb_table_locks' => array( 'type' => 3, ), 'innodb_thread_concurrency' => array( 'type' => 2, ), 'innodb_thread_sleep_delay' => array( 'type' => 2, ), ), $this->object->getVariables() ); } /** * Test for getVariablesLikePattern * * @return void */ public function testGetVariablesLikePattern() { $this->assertEquals( 'innodb\\_%', $this->object->getVariablesLikePattern() ); } /** * Test for getInfoPages * * @return void */ public function testGetInfoPages() { $this->assertEquals( array(), $this->object->getInfoPages() ); $this->object->support = 2; $this->assertEquals( array ( 'Bufferpool' => 'Buffer Pool', 'Status' => 'InnoDB Status' ), $this->object->getInfoPages() ); } /** * Test for getPageBufferpool * * @return void */ public function testGetPageBufferpool() { $this->assertEquals( '
Buffer Pool Usage
Total : 4,096 pages / 65,536 KiB
Free pages 0
Dirty pages 0
Pages containing data 0
Pages to be flushed 0
Busy pages 0
Buffer Pool Activity
Read requests 64
Write requests 64
Read misses 32
Write waits 0
Read misses in % 50 %
Write waits in % 0 %
', $this->object->getPageBufferpool() ); } /** * Test for getPageStatus * * @return void */ public function testGetPageStatus() { $this->assertEquals( '
' . "\n" . "\n" . '
' . "\n", $this->object->getPageStatus() ); } /** * Test for getPage * * @return void */ public function testGetPage() { $this->assertEquals( '', $this->object->getPage('Status') ); $this->object->support = 2; $this->assertEquals( '
' . "\n" . "\n" . '
' . "\n", $this->object->getPage('Status') ); } /** * Test for getMysqlHelpPage * * @return void */ public function testGetMysqlHelpPage() { $this->assertEquals( 'innodb-storage-engine', $this->object->getMysqlHelpPage() ); } /** * Test for getInnodbPluginVersion * * @return void */ public function testGetInnodbPluginVersion() { $this->assertEquals( '1.1.8', $this->object->getInnodbPluginVersion() ); } /** * Test for supportsFilePerTable * * @return void */ public function testSupportsFilePerTable() { $this->assertFalse( $this->object->supportsFilePerTable() ); } /** * Test for getInnodbFileFormat * * @return void */ public function testGetInnodbFileFormat() { $this->assertEquals( 'Antelope', $this->object->getInnodbFileFormat() ); } }