Skip to content

Commit 1a197a8

Browse files
committed
--fix and test
1 parent 6e5d3db commit 1a197a8

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

lib/Helper.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class Helper
3232
'savedir' => null,
3333
'verbose' => null,
3434
'versiontable' => null,
35-
'aliastable' => null,
36-
'aliasprefix' => null,
35+
'aliastable' => false,
36+
'aliasprefix' => false,
3737
'versiontable-engine' => 'MyISAM',
3838
'forceyes' => false,
3939
'noninteractive' => false,

tests/HelperTest.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
class HelperTest extends PHPUnit_Framework_TestCase
4+
{
5+
public function testRequiredParamsShouldBeEnough ()
6+
{
7+
$config = array();
8+
$config['host'] = 'host';
9+
$config['user'] = 'user';
10+
$config['password'] = 'password';
11+
$config['db'] = 'db';
12+
$config['savedir'] = 'savedir';
13+
$config['versiontable'] = 'versiontable';
14+
$config['verbose'] = 'verbose';
15+
Helper::setConfig($config);
16+
$this->assertTrue( Helper::checkConfigEnough());
17+
}
18+
}

0 commit comments

Comments
 (0)