-
Notifications
You must be signed in to change notification settings - Fork 240
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 #600 from stof/fix_tests
Fix the testsuite
- Loading branch information
Showing
3 changed files
with
54 additions
and
22 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 Tests\Prophecy; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Prophecy\Prophet; | ||
|
||
class FunctionalTest extends TestCase | ||
{ | ||
/** | ||
* @test | ||
*/ | ||
public function case_insensitive_method_names() | ||
{ | ||
$prophet = new Prophet(); | ||
$prophecy = $prophet->prophesize('ArrayObject'); | ||
$prophecy->offsetGet(1)->willReturn(1)->shouldBeCalledTimes(1); | ||
$prophecy->offsetget(2)->willReturn(2)->shouldBeCalledTimes(1); | ||
$prophecy->OffsetGet(3)->willReturn(3)->shouldBeCalledTimes(1); | ||
|
||
$arrayObject = $prophecy->reveal(); | ||
self::assertSame(1, $arrayObject->offsetGet(1)); | ||
self::assertSame(2, $arrayObject->offsetGet(2)); | ||
self::assertSame(3, $arrayObject->offsetGet(3)); | ||
} | ||
} |