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

getLeaves() public method

public getLeaves ( Sylius\Component\Core\Model\TaxonInterface $parentTaxon = null ) : Behat\Mink\Element\NodeElement[]
$parentTaxon Sylius\Component\Core\Model\TaxonInterface
return Behat\Mink\Element\NodeElement[]
    public function getLeaves(TaxonInterface $parentTaxon = null);

Usage Example

Example #1
0
 /**
  * @Then they should have order like :firstTaxonName, :secondTaxonName, :thirdTaxonName and :fourthTaxonName
  */
 public function theyShouldHaveOrderLikeAnd(...$taxonsNames)
 {
     $leaves = $this->createPage->getLeaves();
     foreach ($leaves as $key => $leaf) {
         Assert::contains($taxonsNames[$key], $leaf->getText());
     }
 }