forked from FriendsOfBehat/SymfonyExtension
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating a failing test for FriendsOfBehat#88
- Loading branch information
1 parent
8d0cec7
commit 58b9f67
Showing
2 changed files
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Tests\Behat\Context; | ||
|
||
use Behat\Behat\Context\Context; | ||
use Symfony\Component\BrowserKit\AbstractBrowser; | ||
|
||
final class TestClientInjectionContext implements Context | ||
{ | ||
private $client; | ||
|
||
public function __construct(AbstractBrowser $client) | ||
{ | ||
$this->client = $client; | ||
} | ||
|
||
/** @Then the client should be passed */ | ||
public function clientShouldBePassed(): void | ||
{ | ||
assert(is_object($this->client)); | ||
assert($this->client instanceof AbstractBrowser); | ||
} | ||
} |