'table1', 'engine' => 'table`2' ); } } $this->object = $this->getMockForAbstractClass('PMA_StorageEngine', array('dummy')); } /** * 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 getStorageEngines */ public function testGetStorageEngines(){ $this->assertEquals( $this->object->getStorageEngines(), array( 'dummy' => 'table1', 'engine' => 'table`2' ) ); } /** * Test for getHtmlSelect * * @group medium */ public function testGetHtmlSelect(){ $this->assertEquals( $this->object->getHtmlSelect(), ' ' ); } /** * Test for getEngine */ public function testGetEngine(){ $this->assertTrue( $this->object->getEngine('dummy') instanceof PMA_StorageEngine ); } /** * Test for isValid */ public function testIsValid(){ $this->assertTrue( $this->object->isValid('PBMS') ); $this->assertTrue( $this->object->isValid('dummy') ); } /** * Test for getPage */ public function testGetPage(){ $this->assertFalse( $this->object->getPage(1) ); } /** * Test for getInfoPages */ public function testGetInfoPages(){ $this->assertEquals( $this->object->getInfoPages(), array() ); } /** * Test for getVariablesLikePattern */ public function testGetVariablesLikePattern(){ $this->assertFalse( $this->object->getVariablesLikePattern() ); } /** * Test for getMysqlHelpPage */ public function testGetMysqlHelpPage(){ $this->assertEquals( $this->object->getMysqlHelpPage(), 'dummy-storage-engine' ); } /** * Test for getVariables */ public function testGetVariables(){ $this->assertEquals( $this->object->getVariables(), array() ); } /** * Test for getSupportInformationMessage */ public function testGetSupportInformationMessage(){ $this->assertEquals( $this->object->getSupportInformationMessage(), 'This MySQL server does not support the t storage engine.' ); $this->object->support = 1; $this->assertEquals( $this->object->getSupportInformationMessage(), 't has been disabled for this MySQL server.' ); $this->object->support = 2; $this->assertEquals( $this->object->getSupportInformationMessage(), 't is available on this MySQL server.' ); $this->object->support = 3; $this->assertEquals( $this->object->getSupportInformationMessage(), 't is the default storage engine on this MySQL server.' ); } /** * Test for getComment */ public function testGetComment(){ $this->assertEquals( $this->object->getComment(), 't' ); } /** * Test for getTitle */ public function testGetTitle(){ $this->assertEquals( $this->object->getTitle(), 't' ); } /** * Test for engine_init */ public function testEngine_init(){ $this->assertNull( $this->object->engine_init() ); } /** * Test for resolveTypeSize */ public function testResolveTypeSize(){ $this->assertEquals( $this->object->resolveTypeSize(12), array( 0 => 12, 1 => 'B' ) ); } }