[Behat][Taxon] Create taxon for specific child scenario implementation

This commit is contained in:
Mateusz Zalewski 2016-11-04 12:55:12 +01:00
parent 641fa413fb
commit 84f96b1d8a
2 changed files with 6 additions and 3 deletions

View file

@ -9,7 +9,7 @@ Feature: Adding a new taxon for parent
And the store has "Category" taxonomy
And I am logged in as an administrator
@ui @todo
@ui
Scenario: Adding a new taxon for specific parent taxon
Given I want to create a new taxon for "Category"
And I specify its code as "guns"

View file

@ -55,11 +55,14 @@ final class ManagingTaxonsContext implements Context
/**
* @Given I want to create a new taxon
* @Given I want to create a new taxon for :taxon
* @Given I want to see all taxons in store
*/
public function iWantToCreateANewTaxon()
public function iWantToCreateANewTaxon(TaxonInterface $taxon = null)
{
$this->createPage->open();
$parameters = (null !== $taxon) ? ['id' => $taxon->getId()] : [];
$this->createPage->open($parameters);
}
/**