Skip to content

Commit

Permalink
Do not call non-static method statically
Browse files Browse the repository at this point in the history
  • Loading branch information
rybakit committed Jun 8, 2023
1 parent 6a74d2e commit 873c94e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions tests/Integration/Requests/ExecuteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function testExecuteInsertsRows() : void

public function testExecuteFetchesAllRows() : void
{
$seqScan = self::provideSeqScan();
$seqScan = $this->provideSeqScan();
$response = $this->client->execute("SELECT * FROM $seqScan exec_query");

self::assertSame([[1, 'A'], [2, 'B']], $response->getBodyField(Keys::DATA));
Expand Down Expand Up @@ -106,7 +106,7 @@ public function testExecuteUpdateUpdatesRow() : void

public function testExecuteQueryFetchesAllRows() : void
{
$seqScan = self::provideSeqScan();
$seqScan = $this->provideSeqScan();
$result = $this->client->executeQuery("SELECT * FROM $seqScan exec_query");

self::assertSame([[1, 'A'], [2, 'B']], $result->getData());
Expand Down Expand Up @@ -168,7 +168,7 @@ public function testSqlQueryResultHoldsMetadata() : void
{
$client = ClientBuilder::createFromEnv()->build();

$seqScan = self::provideSeqScan();
$seqScan = $this->provideSeqScan();
$response = $client->executeQuery("SELECT * FROM $seqScan exec_query");

self::assertSame([[
Expand All @@ -193,8 +193,8 @@ public function testSqlQueryResultHoldsExtendedMetadata() : void

$tableName = $this->resolvePlaceholders('%target_method%');

$seqScan = self::provideSeqScan();
$response = $client->executeQuery("SELECT id, name as full_name FROM $seqScan $tableName");
$seqScan = $this->provideSeqScan();
$response = $client->executeQuery("SELECT id, name AS full_name FROM $seqScan $tableName");

self::assertSame([[
Keys::METADATA_FIELD_NAME => 'ID',
Expand Down
4 changes: 2 additions & 2 deletions tests/Integration/Requests/PrepareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function testExecuteUpdateUpdatesRows() : void
$insertResult1 = $stmt->executeUpdate(1, 'foo');
$insertResult2 = $stmt->executeUpdate([':name' => 'bar'], [':id' => 2]);

$seqScan = self::provideSeqScan();
$seqScan = $this->provideSeqScan();
$selectResult = $this->client->executeQuery("SELECT * FROM $seqScan prepare_execute ORDER BY id");

try {
Expand Down Expand Up @@ -141,7 +141,7 @@ public function testPrepareResetsPreviouslyBoundParameters() : void
{
$stmt = $this->client->prepare('SELECT :a, :b');

// Bind parameters to the current statement
// Bind parameters to the current statement.
$stmt->execute([':a' => 1], [':b' => 2]);

$result = $stmt->executeQuery([':a' => 1]);
Expand Down

0 comments on commit 873c94e

Please sign in to comment.