Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error on
resource
assertion if message has a second placeholder
Prior to this change code such as `Assert::resource(null, 'stream', 'Got: %s, type: %s')` would fail as the second placeholder was only passed into `sprintf()` if the value supplied is a resource. Test I've added without the code change fails with: ``` 1) Webmozart\Assert\Tests\AssertTest::testResourceOfTypeCustomMessage Failed asserting that exception of type "ArgumentCountError" matches expected exception "\InvalidArgumentException". Message was: "3 arguments are required, 2 given" at <snip>/src/Assert.php:255 <snip>/tests/AssertTest.php:827 ```
- Loading branch information