Skip to content

Commit

Permalink
Merge pull request #222 from Yoast/feature/assertistype-extra-test-cl…
Browse files Browse the repository at this point in the history
…osed-resource

AssertIsType::assertIsResource(): add extra test with closed resource
  • Loading branch information
jrfnl authored Jan 5, 2025
2 parents 293371f + 23a11e0 commit 69025f6
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 69025f6

Please sign in to comment.