Created
May 16, 2016 16:21
-
-
Save JustAnotherMark/2f64cb0aa87f0543dd60242b20cbcfc1 to your computer and use it in GitHub Desktop.
Run Behat tests on a site with HTTP basic auth.
This file contains hidden or 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
| <?php | |
| /** | |
| * Before every scenario log in to HTTP basic auth. | |
| * | |
| * @BeforeScenario | |
| */ | |
| public function beforeScenario() { | |
| $username = 'username'; | |
| $password = 'password'; | |
| // Setup basic auth. | |
| $this->getSession()->setBasicAuth($username, $password); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment