-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12dec83
commit 43230f3
Showing
3 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...-tests/Rector/Expression/ExpectedMockDeclarationRector/Fixture/with_this_argument.php.inc
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,35 @@ | ||
<?php | ||
|
||
namespace Rector\PhpSpecToPHPUnit\Tests\Rector\Expression\ExpectedMockDeclarationRector\Fixture; | ||
|
||
use PhpSpec\ObjectBehavior; | ||
use Rector\PhpSpecToPHPUnit\Tests\Rector\Expression\ExpectedMockDeclarationRector\Source\SomeMethodType; | ||
|
||
class WithThisArgumentSpec extends ObjectBehavior | ||
{ | ||
public function it_should_succeed() | ||
{ | ||
$someMock = $this->createMock(SomeMethodType::class); | ||
$someMock->hasFailed($this)->shouldBeCalled(); | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\PhpSpecToPHPUnit\Tests\Rector\Expression\ExpectedMockDeclarationRector\Fixture; | ||
|
||
use PhpSpec\ObjectBehavior; | ||
use Rector\PhpSpecToPHPUnit\Tests\Rector\Expression\ExpectedMockDeclarationRector\Source\SomeMethodType; | ||
|
||
class WithThisArgumentSpec extends ObjectBehavior | ||
{ | ||
public function it_should_succeed() | ||
{ | ||
$someMock = $this->createMock(SomeMethodType::class); | ||
$someMock->expects($this->once())->method('hasFailed')->with($this->withThisArgument)->shouldBeCalled(); | ||
} | ||
} | ||
|
||
?> |
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