Skip to content

Commit baa687b

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
2 parents 90db3a1 + 960f7d9 commit baa687b

9 files changed

Lines changed: 16 additions & 12 deletions

File tree

libraries/classes/Sql.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ private function getQueryResponseForNoResultsReturned(
999999
$scripts = $header->getScripts();
10001000
$scripts->addFile('sql.js');
10011001

1002-
if (! $statementInfo->isSelect || isset($extraData['error'])) {
1002+
if (($result instanceof ResultInterface && $result->numFields() === 0) || isset($extraData['error'])) {
10031003
return $queryMessage;
10041004
}
10051005

@@ -1646,10 +1646,6 @@ public function executeQueryAndGetQueryResponse(
16461646
$extraData,
16471647
);
16481648

1649-
if ($this->dbi->moreResults()) {
1650-
$this->dbi->nextResult();
1651-
}
1652-
16531649
$warningMessages = $this->operations->getWarningMessagesArray();
16541650

16551651
// No rows returned -> move back to the calling page

test/classes/Controllers/Import/ImportControllerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public function testIndexParametrized(): void
6767
'SELECT A.* FROM table1 A WHERE A.nomEtablissement = \'Saint-Louis - Châteaulin\''
6868
. ' AND foo = 4 AND `:a` IS NULL LIMIT 0, 25',
6969
[],
70+
['nomEtablissement', 'foo'],
7071
);
7172

7273
$this->dummyDbi->addResult(

test/selenium/CreateDropDatabaseTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ private function dropDatabase(): void
8383
$this->dbQuery(
8484
'SHOW DATABASES LIKE \'' . $this->databaseName . '\';',
8585
function (): void {
86-
$this->assertFalse($this->isElementPresent('className', 'table_results'));
86+
$this->assertTrue($this->isElementPresent('className', 'table_results'));
87+
$this->assertFalse($this->isElementPresent('cssSelector', '.table_results tbody tr'));
8788
},
8889
);
8990
}

test/selenium/Database/EventsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ public function testDropEvent(): void
211211
'USE `' . $this->databaseName . '`;'
212212
. 'SHOW EVENTS WHERE Db=\'' . $this->databaseName . '\' AND Name=\'test_event\';',
213213
function (): void {
214-
$this->assertFalse($this->isElementPresent('className', 'table_results'));
214+
$this->assertTrue($this->isElementPresent('className', 'table_results'));
215+
$this->assertFalse($this->isElementPresent('cssSelector', '.table_results tbody tr'));
215216
},
216217
);
217218
}

test/selenium/Database/OperationsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ function () use ($newDbName): void {
8282
$this->dbQuery(
8383
'SHOW DATABASES LIKE \'' . $this->databaseName . '\'',
8484
function (): void {
85-
$this->assertFalse($this->isElementPresent('className', 'table_results'));
85+
$this->assertTrue($this->isElementPresent('className', 'table_results'));
86+
$this->assertFalse($this->isElementPresent('cssSelector', '.table_results tbody tr'));
8687
},
8788
);
8889

test/selenium/Database/ProceduresTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ public function testDropProcedure(): void
205205
$this->dbQuery(
206206
"SHOW PROCEDURE STATUS WHERE Db='" . $this->databaseName . "'",
207207
function (): void {
208-
$this->assertFalse($this->isElementPresent('className', 'table_results'));
208+
$this->assertTrue($this->isElementPresent('className', 'table_results'));
209+
$this->assertFalse($this->isElementPresent('cssSelector', '.table_results tbody tr'));
209210
},
210211
);
211212
}

test/selenium/Database/StructureTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ public function testDropMultipleTables(): void
8585
$this->dbQuery(
8686
'SHOW TABLES FROM `' . $this->databaseName . '`;',
8787
function (): void {
88-
$this->assertFalse($this->isElementPresent('className', 'table_results'));
88+
$this->assertTrue($this->isElementPresent('className', 'table_results'));
89+
$this->assertFalse($this->isElementPresent('cssSelector', '.table_results tbody tr'));
8990
},
9091
);
9192
}

test/selenium/Table/OperationsTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ public function testDropTable(): void
206206
'USE `' . $this->databaseName . '`;'
207207
. 'SHOW TABLES',
208208
function (): void {
209-
$this->assertFalse($this->isElementPresent('className', 'table_results'));
209+
$this->assertTrue($this->isElementPresent('className', 'table_results'));
210+
$this->assertFalse($this->isElementPresent('cssSelector', '.table_results tbody tr'));
210211
},
211212
);
212213
}

test/selenium/TriggersTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@ function (): void {
193193
$this->dbQuery(
194194
'SHOW TRIGGERS FROM `' . $this->databaseName . '`;',
195195
function (): void {
196-
$this->assertFalse($this->isElementPresent('className', 'table_results'));
196+
$this->assertTrue($this->isElementPresent('className', 'table_results'));
197+
$this->assertFalse($this->isElementPresent('cssSelector', '.table_results tbody tr'));
197198
},
198199
);
199200
}

0 commit comments

Comments
 (0)