I'm testing my PHP / bootstrap application with Behat + Mink. I'm currently trying to use variables to grab from a field with a Scenario Outline.
My code looks like this in feature file Feature: Stock Portfolio In order to see what stocks are owned As a user I want to display my portfolio
Scenario: User Is On Home Page
Given that I am logged in
When print current URL
Then I should see "Portfolio"
Scenario Outline: User Buys Stock
Given that I am logged in
And I own <start> "AAPL" stocks
When I fill in "ticker" with "AAPL"
And I sell <sell> stock
Then I should own <finish> "AAPL" stocks
Examples:
| start | sell | finish |
| 13 | 5 | 8 |
| 10 | 3 | 7 |
in php file
/**
* @Then /^I should own (.*) "([^"]*)" stocks$/
*/
public function iShouldOwnStocks($start, $arg1)
{
$this->assertSession()->fieldValueEquals($arg1, $start);
}
/**
* @Given /^I sell (.*) stock$/
*/
public function iSellStock($sell)
{
$this->fillField("quantity", $sell);
}
/**
* @Given /^I own (.*) "([^"]*)" stocks$/
*/
public function iOwnStocks($start, $arg1)
{
$this->assertSession()->fieldValueEquals($arg1, $start);
}
The error I keep getting is:
I'm not quite sure what's going on here - help would be super appreciated!