Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AdalbertMemSQL committed Dec 12, 2023
1 parent de5f662 commit 42f409e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Connect/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace SingleStore\Laravel\Connect;

use Illuminate\Database\MySqlConnection;
use Illuminate\Database\Events\QueryExecuted;
use SingleStore\Laravel\Query;
use SingleStore\Laravel\QueryGrammar;
use SingleStore\Laravel\Schema;
Expand Down Expand Up @@ -66,4 +67,23 @@ public function query()
$this->getPostProcessor()
);
}

// /**
// * Log a query in the connection's query log.
// *
// * @param string $query
// * @param array $bindings
// * @param float|null $time
// * @return void
// */
// public function logQuery($query, $bindings, $time = null)
// {
// $this->totalQueryDuration += $time ?? 0.0;
//
// $this->event(new QueryExecuted($query, $bindings, $time, $this));
//
// if ($this->loggingQueries) {
// $this->queryLog[] = compact('query', 'bindings', 'time');
// }
// }
}
8 changes: 8 additions & 0 deletions tests/Hybrid/Json/JsonUpdateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public function set_boolean_execution()
/** @test */
public function set_string_syntax()
{
if (! $this->runHybridIntegrations()) {
return;
}

[$logs] = DB::pretend(function ($database) {
$database->table('test')->update([
'data->value1' => 'foo',
Expand Down Expand Up @@ -125,6 +129,10 @@ public function set_double_execution()
/** @test */
public function set_json_syntax()
{
if (! $this->runHybridIntegrations()) {
return;
}

[$logs] = DB::pretend(function ($database) {
$database->table('test')->update([
'data->value1' => ['foo' => 'bar'],
Expand Down

0 comments on commit 42f409e

Please sign in to comment.