-
Notifications
You must be signed in to change notification settings - Fork 457
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1075 from GrahamCampbell/patch-1
[1.3] Support iterable and removed uneeded check
- 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
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,26 @@ | ||
<?php | ||
|
||
namespace test\Mockery; | ||
|
||
use Mockery\Adapter\Phpunit\MockeryTestCase; | ||
|
||
/** | ||
* @requires PHP 7.1.0-dev | ||
*/ | ||
class Php71LanguageFeaturesTest extends MockeryTestCase | ||
{ | ||
public function testMockingIterableReturnType() | ||
{ | ||
$mock = mock("test\Mockery\ReturnTypeIterableTypeHint"); | ||
|
||
$mock->shouldReceive("returnIterable"); | ||
$this->assertSame([], $mock->returnIterable()); | ||
} | ||
} | ||
|
||
abstract class ReturnTypeIterableTypeHint | ||
{ | ||
public function returnIterable(): iterable | ||
{ | ||
} | ||
} |