Skip to content
This repository has been archived by the owner on Jun 18, 2019. It is now read-only.

Commit

Permalink
updated helper method
Browse files Browse the repository at this point in the history
  • Loading branch information
dimsav committed Jan 4, 2018
1 parent 8c0b59f commit ce68833
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions tests/TestsBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,9 @@ protected function getPackageAliases($app)
protected function enableQueryCounter()
{
$that = $this;
$event = App::make('events');
$event->listen('illuminate.query', function ($query, $bindings) use ($that) {
DB::listen(function($query) use ($that) {
$that->queriesCount++;
$bindings = $this->formatBindingsForSqlInjection($bindings);
$query = $this->insertBindingsIntoQuery($query, $bindings);
$query = $this->beautifyQuery($query);
// echo("\n--- Query {$that->queriesCount}--- $query\n");
// echo("\n--- Query {$that->queriesCount}--- $query->sql\n");
});
}

Expand Down

0 comments on commit ce68833

Please sign in to comment.