55namespace OpenTelemetry \Tests \Instrumentation \IO \tests \Integration ;
66
77use ArrayObject ;
8+ use CurlHandle ;
89use OpenTelemetry \API \Instrumentation \Configurator ;
910use OpenTelemetry \Context \ScopeInterface ;
1011use OpenTelemetry \SDK \Trace \ImmutableSpan ;
@@ -41,6 +42,7 @@ public function tearDown(): void
4142 public function test_io_calls (): void
4243 {
4344 $ resource = fopen ('php://memory ' , 'r ' );
45+ $ this ->assertIsResource ($ resource );
4446 $ this ->assertCount (1 , $ this ->storage );
4547 $ this ->span = $ this ->storage ->offsetGet (0 );
4648 $ this ->assertSame ('fopen ' , $ this ->span ->getName ());
@@ -52,8 +54,8 @@ public function test_io_calls(): void
5254 $ this ->span = $ this ->storage ->offsetGet (1 );
5355 $ this ->assertSame ('file_put_contents ' , $ this ->span ->getName ());
5456 $ this ->assertSame ('php://memory ' , $ this ->span ->getAttributes ()->get ('code.params.filename ' ));
55-
56- $ str = file_get_contents ('php://memory ' );
57+
58+ file_get_contents ('php://memory ' );
5759 $ this ->assertCount (3 , $ this ->storage );
5860 $ this ->span = $ this ->storage ->offsetGet (2 );
5961 $ this ->assertSame ('file_get_contents ' , $ this ->span ->getName ());
@@ -70,6 +72,7 @@ public function test_io_calls(): void
7072 $ this ->assertSame ('fread ' , $ this ->span ->getName ());
7173
7274 $ ch = curl_init ('foo ' );
75+ $ this ->assertInstanceOf (CurlHandle::class, $ ch );
7376 $ this ->assertCount (6 , $ this ->storage );
7477 $ this ->span = $ this ->storage ->offsetGet (5 );
7578 $ this ->assertSame ('curl_init ' , $ this ->span ->getName ());
0 commit comments