Skip to content

Commit

Permalink
laminas#214 @fix: "MySQL integration test fail in section testNamedPa…
Browse files Browse the repository at this point in the history
…rameters"/fix test "testBindParamByFieldNameIsFail" - wrong name of a fieldName
  • Loading branch information
ZVanoZ committed Sep 27, 2021
1 parent 343b33b commit 808c64a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
56 changes: 28 additions & 28 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions test/integration/Adapter/Driver/Pdo/Mysql/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,17 +172,17 @@ public function testBindParamByNameIsSuccess()

/**
* This test verify exception, if field names was confused.
* Field names "name" and "id" is confused.
* Field name "id" named "idFieldName" - it is wrong.
*/
public function testBindParamByFieldNameIsFail()
{
$stmt = $this->getStatementForTestBinding();
try {
//real named parameters
$stmt->execute([
'name' => 1, // FAIL -- 0 ":c_0" "name" varchar(255)
'value' => 'foo', //OK -- 1 ":c_1" "value" varchar(255)
'id' => 'bar', //FAIL -- 2 ":where1" "id" int
'name' => 'bar', // OK -- 0 ":c_0" "name" varchar(255)
'value' => 'foo', // OK -- 1 ":c_1" "value" varchar(255)
'idFieldName' => 1, // FAIL -- 2 ":where1" "id" int
]);
$this->assertTrue(false, __METHOD__, "/Fail. Extect exception.");
} catch (Exception $e) {
Expand Down

0 comments on commit 808c64a

Please sign in to comment.