Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
Co-Authored-By: Amélie-Dzovinar <dzov@users.noreply.github.com>
  • Loading branch information
GrahamCampbell and Dzov committed Jul 7, 2020
1 parent ffabfce commit 48b23ad
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<testsuite name="Mockery Test Suite">
<directory suffix="Test.php">./tests</directory>
<directory phpVersion="7.0.0" phpVersionOperator=">=">./tests/PHP70</directory>
<directory phpVersion="7.1.0" phpVersionOperator=">=">./tests/PHP71</directory>
<directory phpVersion="7.2.0" phpVersionOperator=">=">./tests/PHP72</directory>
</testsuite>

Expand All @@ -15,6 +16,7 @@
<directory suffix="Test.php">./tests/PHP56</directory>

<exclude>./tests/PHP70</exclude>
<exclude>./tests/PHP71</exclude>
<exclude>./tests/PHP72</exclude>
</testsuite>
</testsuites>
Expand Down
26 changes: 26 additions & 0 deletions tests/PHP71/Php71LanguageFeaturesTest.php
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
{
}
}

0 comments on commit 48b23ad

Please sign in to comment.