Skip to content

Commit

Permalink
Merge pull request #51 from jstoone/fix-queries-method
Browse files Browse the repository at this point in the history
Fix broken `queries()`-method
  • Loading branch information
freekmurze authored Jan 10, 2021
2 parents bca8a21 + 01e0554 commit fd955f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ray.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function showQueries($callable = null): self

public function queries($callable = null): self
{
$this->showQueries($callable);
return $this->showQueries($callable);
}

public function stopShowingQueries(): self
Expand Down
10 changes: 10 additions & 0 deletions tests/RayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ public function it_can_start_logging_queries()
$this->assertCount(1, $this->client->sentPayloads());
}

/** @test */
public function it_can_start_logging_queries_using_alias()
{
ray()->queries();

DB::table('users')->get('id');

$this->assertCount(1, $this->client->sentPayloads());
}

/** @test */
public function it_can_stop_logging_queries()
{
Expand Down

0 comments on commit fd955f5

Please sign in to comment.