function it_changes_the_status_of_the_products_when_performing_the_operation(AbstractQuery $query, ProductInterface $product2, ProductInterface $product1)
 {
     $this->setObjectsToMassEdit([$product1, $product2]);
     $this->setToEnable(false);
     $product1->setEnabled(false)->shouldBeCalled();
     $product2->setEnabled(false)->shouldBeCalled();
     $this->perform();
     $this->setToEnable(true);
     $product1->setEnabled(true)->shouldBeCalled();
     $product2->setEnabled(true)->shouldBeCalled();
     $this->perform();
 }
 /**
  * {@inheritdoc}
  *
  * Expected data input format : true|false
  */
 public function setFieldData(ProductInterface $product, $field, $data, array $options = [])
 {
     $product->setEnabled($data);
 }
 /**
  * {@inheritdoc}
  */
 protected function doPerform(ProductInterface $product)
 {
     $product->setEnabled($this->toEnable);
 }
 function it_sets_fields_if_data_is_not_boolean(ProductInterface $product)
 {
     $product->setEnabled(Argument::any())->shouldBeCalled();
     $this->setFieldData($product, 'enabled', 'foo');
 }