function it_massively_insert_and_update_objects($bulkSaver, $bulkDetacher, $stepExecution, $attributeGroupRepository, AttributeGroupInterface $object1, AttributeGroupInterface $object2, AttributeGroupInterface $defaultGroup) { $attributeGroupRepository->findDefaultAttributeGroup()->willReturn($defaultGroup); $bulkSaver->saveAll([$object1, $object2, $defaultGroup]); $bulkDetacher->detachAll([$object1, $object2, $defaultGroup]); $object1->getId()->willReturn(null); $stepExecution->incrementSummaryInfo('create')->shouldBeCalled(); $defaultGroup->getId()->willReturn(42); $stepExecution->incrementSummaryInfo('process')->shouldBeCalled(); $this->write([$object1, $defaultGroup]); }
/** * @param AttributeGroupInterface $group * * @Given /^I should be on the ("([^"]*)" attribute group) page$/ */ public function iShouldBeOnTheAttributeGroupPage(AttributeGroupInterface $group) { $expectedAddress = $this->getPage('AttributeGroup edit')->getUrl(['id' => $group->getId()]); $this->assertAddress($expectedAddress); }
/** * @param AttributeGroupInterface $group */ protected function initializeGroup(AttributeGroupInterface $group) { $this->view[$group->getId()] = ['label' => $group->getLabel(), 'attributes' => []]; }