Skip to content

Commit

Permalink
Laravel: psalm linting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisLightfootWild committed Nov 16, 2023
1 parent 73501bb commit a7610ba
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ public function test_request_response(): void
$response = $this->call('GET', '/');
$this->assertEquals(200, $response->status());
$this->assertCount(1, $this->storage);
$span = $this->storage->offsetGet(0);
$span = $this->storage[0];
$this->assertSame('GET', $span->getName());

$response = Http::get('opentelemetry.io');
$this->assertEquals(200, $response->status());
$span = $this->storage->offsetGet(1);
$span = $this->storage[1];
$this->assertSame('GET', $span->getName());
}
public function test_cache_log_db(): void
Expand All @@ -46,7 +46,7 @@ public function test_cache_log_db(): void
$response = $this->call('GET', '/hello');
$this->assertEquals(200, $response->status());
$this->assertCount(2, $this->storage);
$span = $this->storage->offsetGet(1);
$span = $this->storage[1];
$this->assertSame('GET', $span->getName());
$this->assertSame('http://localhost/hello', $span->getAttributes()->get(TraceAttributes::URL_FULL));
$this->assertCount(5, $span->getEvents());
Expand All @@ -56,7 +56,7 @@ public function test_cache_log_db(): void
$this->assertSame('cache hit', $span->getEvents()[3]->getName());
$this->assertSame('cache forget', $span->getEvents()[4]->getName());

$span = $this->storage->offsetGet(0);
$span = $this->storage[0];
$this->assertSame('sql SELECT', $span->getName());
$this->assertSame('SELECT', $span->getAttributes()->get('db.operation'));
$this->assertSame(':memory:', $span->getAttributes()->get('db.name'));
Expand Down

0 comments on commit a7610ba

Please sign in to comment.