Refactored ConfigFile class so that it is no longer a singleton
[phpmyadmin.git] / test / engines / PMA_StorageEngine_bdb_test.php
bloba65443b165a1224f684058944f3e38f550d94285
1 <?php
2 /**
3 * Tests for PMA_StorageEngine_Bdb
5 * @package PhpMyAdmin-test
6 */
8 /*
9 * Include to test.
12 require_once 'libraries/StorageEngine.class.php';
13 require_once 'libraries/engines/bdb.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_Bdb_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_Bdb('bdb');
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 'version_bdb' => array(
58 'title' => __('Version information'),
60 'bdb_cache_size' => array(
61 'type' => 1,
63 'bdb_home' => array(
65 'bdb_log_buffer_size' => array(
66 'type' => 1,
68 'bdb_logdir' => array(
70 'bdb_max_lock' => array(
71 'type' => 2,
73 'bdb_shared_data' => array(
75 'bdb_tmpdir' => array(
77 'bdb_data_direct' => array(
79 'bdb_lock_detect' => array(
81 'bdb_log_direct' => array(
83 'bdb_no_recover' => array(
85 'bdb_no_sync' => array(
87 'skip_sync_bdb_logs' => array(
89 'sync_bdb_logs' => array(
95 /**
96 * Test for getVariablesLikePattern
98 public function testGetVariablesLikePattern()
100 $this->assertEquals(
101 $this->object->getVariablesLikePattern(),
102 '%bdb%'
107 * Test for getMysqlHelpPage
109 public function testGetMysqlHelpPage()
111 $this->assertEquals(
112 $this->object->getMysqlHelpPage(),
113 'bdb'