예제 #1
0
 /**
  * @param TaxonInterface $taxon
  *
  * @return callable|null
  */
 private function getFilterTaxonOption(TaxonInterface $taxon)
 {
     if (null === $taxon->getId()) {
         return null;
     }
     return function (TaxonInterface $entry) use($taxon) {
         return $entry->getId() !== $taxon->getId();
     };
 }
예제 #2
0
 /**
  * Get the closure to filter taxon collection.
  *
  * @param TaxonInterface $taxon
  *
  * @return callable|null
  */
 private function getFilterTaxonOption(TaxonInterface $taxon)
 {
     $closure = null;
     if (null !== $taxon->getId()) {
         $closure = function ($entry) use($taxon) {
             return $entry->getId() != $taxon->getId();
         };
     }
     return $closure;
 }
 function it_does_reverse_transform_array_of_arrays_value(TaxonInterface $entityThree, TaxonInterface $entityFour)
 {
     $entityThree->getId()->willReturn(3);
     $entityFour->getId()->willReturn(4);
     $this->reverseTransform(array(array($entityThree, $entityFour)))->shouldHaveCount(2);
 }
예제 #4
0
 /**
  * @When /^I am browsing products from ("([^"]+)" taxon)$/
  */
 public function iAmBrowsingProductsFromTaxon(TaxonInterface $taxon)
 {
     $this->indexPerTaxonPage->open(['taxonId' => $taxon->getId()]);
 }