Skip to content

Commit

Permalink
AssertIsType::assertIsResource(): add extra test with closed resource
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Jan 5, 2025
1 parent 293371f commit 23a11e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Polyfills/AssertIsTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ public function testAssertIsResource() {
\closedir( $resource );
}

/**
* Verify assertIsResource() method handles closed resources correctly.
*
* @return void
*/
public function testAssertIsResourceAllowsForClosedResources() {
$resource = \opendir( __DIR__ );
\closedir( $resource );

$this->assertIsResource( $resource );
}

/**
* Verify availability of the assertIsArray() method.
*
Expand Down

0 comments on commit 23a11e0

Please sign in to comment.