Skip to content

Commit 660d603

Browse files
committed
Update AddCommandTest.php
1 parent 9ae9ba0 commit 660d603

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/webfiori/framework/test/cli/AddCommandTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public function testAddDBConnection00() {
4949
''
5050
]);
5151

52-
53-
$connName = 'db-connection-'.(count(App::getConfig()->getDBConnections()) - 1);
52+
$count = count(App::getConfig()->getDBConnections());
53+
$connName = 'db-connection-'.$count;
5454
$this->assertEquals([
5555
"What would you like to add?\n",
5656
"0: New database connection.\n",
@@ -139,7 +139,8 @@ public function testAddDBConnection02() {
139139
'add'
140140
]);
141141
$this->assertEquals(0, $runner->start());
142-
$connName = 'db-connection-'.count(App::getConfig()->getDBConnections());
142+
$count = count(App::getConfig()->getDBConnections());
143+
$connName = 'db-connection-'.($count);
143144
$this->assertEquals([
144145
"What would you like to add?\n",
145146
"0: New database connection.\n",

0 commit comments

Comments
 (0)