new unit tests, thanks to Michal Biniek
This commit is contained in:
48
test/PMA_foreignKeySupported_test.php
Normal file
48
test/PMA_foreignKeySupported_test.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Test for supporting foreign key
|
||||
*
|
||||
* @author Michal Biniek <michal@bystrzyca.pl>
|
||||
* @package phpMyAdmin-test
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
/**
|
||||
* Tests core.
|
||||
*/
|
||||
require_once 'PHPUnit/Framework.php';
|
||||
|
||||
/**
|
||||
* Include to test.
|
||||
*/
|
||||
require_once './libraries/common.lib.php';
|
||||
|
||||
/**
|
||||
* Test supported foreign key.
|
||||
*
|
||||
*/
|
||||
class PMA_foreignKeySupported_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* data provider for foreign key supported test
|
||||
*/
|
||||
|
||||
public function foreignkeySupportedDataProvider() {
|
||||
return array(
|
||||
array('MyISAM', false),
|
||||
array('innodb', true),
|
||||
array('pBxT', true)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* foreign key supported test
|
||||
* @dataProvider foreignkeySupportedDataProvider
|
||||
*/
|
||||
|
||||
public function testForeignkeySupported($a, $e) {
|
||||
$this->assertEquals($e, PMA_foreignkey_supported($a));
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user