File tree Expand file tree Collapse file tree 3 files changed +47
-1
lines changed
Expand file tree Collapse file tree 3 files changed +47
-1
lines changed Original file line number Diff line number Diff line change 5858 "require-dev" : {
5959 "buggregator/trap" : " ^1.13.0" ,
6060 "composer/composer" : " ^2.8.4" ,
61+ "cweagans/composer-patches" : " ^2.0" ,
6162 "dereuromark/composer-prefer-lowest" : " ^0.1.10" ,
6263 "doctrine/annotations" : " ^1.14.4 || ^2.0.2" ,
6364 "internal/dload" : " ^1.2.0" ,
103104 "test:accept" : " phpunit --testsuite=Acceptance --color=always --testdox"
104105 },
105106 "config" : {
106- "sort-packages" : true
107+ "sort-packages" : true ,
108+ "allow-plugins" : {
109+ "cweagans/composer-patches" : true
110+ }
111+ },
112+ "extra" : {
113+ "patches" : {
114+ "phpunit/phpunit" : {
115+ "Improve assertInstanceOf error message" : " patches/phpunit-instance-of.patch"
116+ }
117+ }
107118 },
108119 "minimum-stability" : " dev" ,
109120 "prefer-stable" : true
Original file line number Diff line number Diff line change 1+ {
2+ "_hash" : " a019c9b721919a9a16ed12424d63d5316cb7d0baf6749363b7aabfa962758213" ,
3+ "patches" : {
4+ "phpunit/phpunit" : [
5+ {
6+ "package" : " phpunit/phpunit" ,
7+ "description" : " Improve assertInstanceOf error message" ,
8+ "url" : " patches/phpunit-instance-of.patch" ,
9+ "sha256" : " 4c42249225a057ca528837c8d2642a9fdb7f483991459c9422437b68f0597a70" ,
10+ "depth" : 1 ,
11+ "extra" : {
12+ "provenance" : " root"
13+ }
14+ }
15+ ]
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ --- a/src/Framework/Constraint/Type/IsInstanceOf.php
2+ +++ b/src/Framework/Constraint/Type/IsInstanceOf.php
3+ @@ -74,5 +74,14 @@
4+ */
5+ protected function failureDescription(mixed $other): string
6+ {
7+ - return $this->valueToTypeStringFragment($other) . $this->toString(true);
8+ + $description = $this->valueToTypeStringFragment($other);
9+ +
10+ + if (\is_object($other)) {
11+ + $description = \sprintf(
12+ + 'an instance of class %s ',
13+ + \get_class($other),
14+ + );
15+ + }
16+ +
17+ + return $description . $this->toString();
18+ }
You can’t perform that action at this time.
0 commit comments