-
-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hotfix/#301-fix-null-object-return-types' into 2.0.x
Close #301
- Loading branch information
Showing
3 changed files
with
33 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
tests/language-feature-scripts/null-object-satisfies-return-type-declaration.phpt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--TEST-- | ||
Verifies that generated null object satisfies return type declarations | ||
--FILE-- | ||
<?php | ||
|
||
declare (strict_types = 1); | ||
|
||
require_once __DIR__ . '/init.php'; | ||
|
||
class Kitchen | ||
{ | ||
public function foo() | ||
{ | ||
return 'bar'; | ||
} | ||
} | ||
|
||
$factory = new \ProxyManager\Factory\NullObjectFactory($configuration); | ||
|
||
$proxy = $factory->createProxy(Kitchen::class); | ||
|
||
var_dump($proxy instanceof Kitchen); | ||
?> | ||
--EXPECT-- | ||
bool(true) |