Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions src/Behat/MinkExtension/Context/MinkContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,66 @@ public function assertResponseStatusIsNot($code)
$this->assertSession()->statusCodeNotEquals($code);
}

/**
* Checks, that current page response header is equal to specified.
*
* @Then /^the response header "(?P<name>(?:[^"]|\\")*)" should be "(?P<value>(?:[^"]|\\")*)"$/
*/
public function assertResponseHeader($name, $value)
{
$this->assertSession()->responseHeaderEquals($name, $value);
}

/**
* Checks, that current page response header is not equal to specified.
*
* @Then /^the response header "(?P<name>(?:[^"]|\\")*)" should not be "(?P<value>(?:[^"]|\\")*)"$/
*/
public function assertResponseHeaderIsNot($name, $value)
{
$this->assertSession()->responseHeaderNotEquals($name, $value);
}

/**
* Checks, that current page response header contains specified value.
*
* @Then /^the response header "(?P<name>(?:[^"]|\\")*)" should contain "(?P<value>(?:[^"]|\\")*)"$/
*/
public function assertResponseHeaderContains($name, $value)
{
$this->assertSession()->responseHeaderContains($name, $value);
}

/**
* Checks, that current page response header does not contain specified value.
*
* @Then /^the response header "(?P<name>(?:[^"]|\\")*)" should not contain "(?P<value>(?:[^"]|\\")*)"$/
*/
public function assertResponseHeaderNotContains($name, $value)
{
$this->assertSession()->responseHeaderNotContains($name, $value);
}

/**
* Checks, that current page response header is equal to specified.
*
* @Then /^the response header "(?P<name>(?:[^"]|\\")*)" should match "(?P<value>(?:[^"]|\\")*)"$/
*/
public function assertResponseHeaderMatches($name, $value)
{
$this->assertSession()->responseHeaderMatches($name, $value);
}

/**
* Checks, that current page response header is not equal to specified.
*
* @Then /^the response header "(?P<name>(?:[^"]|\\")*)" should not match "(?P<value>(?:[^"]|\\")*)"$/
*/
public function assertResponseHeaderNotMatches($name, $value)
{
$this->assertSession()->responseHeaderNotMatches($name, $value);
}

/**
* Checks, that page contains specified text.
*
Expand Down