function it_transforms_taxons_collection_to_product_taxons_collection(ProductTaxonInterface $productTaxon, TaxonInterface $taxon, FactoryInterface $productTaxonFactory) { $productTaxons = new ArrayCollection([$productTaxon->getWrappedObject()]); $taxons = new ArrayCollection([$taxon->getWrappedObject()]); $productTaxonFactory->createNew()->willReturn($productTaxon); $productTaxon->setTaxon($taxon)->shouldBeCalled(); $this->reverseTransform($taxons)->shouldBeCollection($productTaxons); }