Sylius\Behat\Page\Admin\Taxon\CreatePageInterface::getLeafNameFromPosition PHP Method

getLeafNameFromPosition() public method

public getLeafNameFromPosition ( integer $position, Sylius\Component\Core\Model\TaxonInterface $parentTaxon = null ) : string
$position integer
$parentTaxon Sylius\Component\Core\Model\TaxonInterface
return string
    public function getLeafNameFromPosition($position, TaxonInterface $parentTaxon = null);

Usage Example

Ejemplo n.º 1
0
 /**
  * @Then the first taxon on the list should be :taxon
  */
 public function theFirstTaxonOnTheListShouldBe(TaxonInterface $taxon)
 {
     $this->createPage->open();
     Assert::same($this->createPage->getLeafNameFromPosition(0), $taxon->getName(), sprintf('Expected %s as a first taxon, but got %s.', $taxon->getName(), $this->createPage->getLeafNameFromPosition(0)));
 }