Refactored ConfigFile class so that it is no longer a singleton
[phpmyadmin.git] / test / engines / PMA_StorageEngine_myisam_test.php
blobb7e06f0dd2d307a6da329d8d4bef89bed6182a50
1 <?php
2 /**
3 * Tests for PMA_StorageEngine_myisam
5 * @package PhpMyAdmin-test
6 */
8 /*
9 * Include to test.
12 require_once 'libraries/StorageEngine.class.php';
13 require_once 'libraries/engines/myisam.lib.php';
14 require_once 'libraries/php-gettext/gettext.inc';
15 require_once 'libraries/database_interface.inc.php';
16 require_once 'libraries/Tracker.class.php';
18 class PMA_StorageEngine_myisam_Test extends PHPUnit_Framework_TestCase
20 /**
21 * @access protected
23 protected $object;
25 /**
26 * Sets up the fixture, for example, opens a network connection.
27 * This method is called before a test is executed.
29 * @access protected
30 * @return void
32 protected function setUp()
34 $this->object = new PMA_StorageEngine_myisam('myisam');
37 /**
38 * Tears down the fixture, for example, closes a network connection.
39 * This method is called after a test is executed.
41 * @access protected
42 * @return void
44 protected function tearDown()
46 unset($this->object);
49 /**
50 * Test for getVariables
52 public function testGetVariables()
54 $this->assertEquals(
55 $this->object->getVariables(),
56 array(
57 'myisam_data_pointer_size' => array(
58 'title' => __('Data pointer size'),
59 'desc' => __('The default pointer size in bytes, to be used by CREATE TABLE for MyISAM tables when no MAX_ROWS option is specified.'),
60 'type' => 1,
62 'myisam_recover_options' => array(
63 'title' => __('Automatic recovery mode'),
64 'desc' => __('The mode for automatic recovery of crashed MyISAM tables, as set via the --myisam-recover server startup option.'),
66 'myisam_max_sort_file_size' => array(
67 'title' => __('Maximum size for temporary sort files'),
68 'desc' => __('The maximum size of the temporary file MySQL is allowed to use while re-creating a MyISAM index (during REPAIR TABLE, ALTER TABLE, or LOAD DATA INFILE).'),
69 'type' => 1,
71 'myisam_max_extra_sort_file_size' => array(
72 'title' => __('Maximum size for temporary files on index creation'),
73 'desc' => __('If the temporary file used for fast MyISAM index creation would be larger than using the key cache by the amount specified here, prefer the key cache method.'),
74 'type' => 1,
76 'myisam_repair_threads' => array(
77 'title' => __('Repair threads'),
78 'desc' => __('If this value is greater than 1, MyISAM table indexes are created in parallel (each index in its own thread) during the repair by sorting process.'),
79 'type' => 2,
81 'myisam_sort_buffer_size' => array(
82 'title' => __('Sort buffer size'),
83 'desc' => __('The buffer that is allocated when sorting MyISAM indexes during a REPAIR TABLE or when creating indexes with CREATE INDEX or ALTER TABLE.'),
84 'type' => 1,
86 'myisam_stats_method' => array(
88 'delay_key_write' => array(
90 'bulk_insert_buffer_size' => array(
91 'type' => 1,
93 'skip_external_locking' => array(