public function testBeforeSave() { $this->assertEmpty($this->_product->getTypeHasOptions()); $this->assertEmpty($this->_product->getTypeHasRequiredOptions()); $this->_product->setCanSaveConfigurableAttributes(true); $this->_product->setConfigurableAttributesData([['values' => 'not empty']]); $this->_model->beforeSave($this->_product); $this->assertTrue($this->_product->getTypeHasOptions()); $this->assertTrue($this->_product->getTypeHasRequiredOptions()); }