コード例 #1
0
ファイル: ConfigurableTest.php プロジェクト: nja78/magento2
 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());
 }