public function iAmAuthenticatingAs($username, $password)
    {
        $this->removeHeader('Authorization');
        $this->authorization = base64_encode($username . ':' . $password);
        $this->addHeader('Authorization', 'Basic ' . $this->authorization);
    }
public function iAmAuthenticatingAs($username, $password)
    {
        $this->removeHeader('Authorization');
        $this->authorization = base64_encode($username . ':' . $password);
        $this->addHeader('Authorization', 'Basic ' . $this->authorization);
    }
public function iAmAuthenticatingAs ( $ username , $ password ) { $ this -> removeHeader ( 'Authorization' ) ; $ this -> authorization = base64_encode ( $ username . ':' . $ password ) ; $ this -> addHeader ( 'Authorization' , 'Basic ' . $ this -> authorization ) ; }
Adds Basic Authentication header to next request.

@param string $username
@param string $password

@Given /^I am authenticating as "([^"]*)" with "([^"]*)" password$/
Adds Basic Authentication header to next request .