当前位置: 首页>>代码示例>>PHP>>正文


PHP CatalogProductNew::getFormAction方法代码示例

本文整理汇总了PHP中Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew::getFormAction方法的典型用法代码示例。如果您正苦于以下问题:PHP CatalogProductNew::getFormAction方法的具体用法?PHP CatalogProductNew::getFormAction怎么用?PHP CatalogProductNew::getFormAction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew的用法示例。


在下文中一共展示了CatalogProductNew::getFormAction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testCreateDownloadableProduct

 /**
  * Test create downloadable product
  *
  * @param CatalogProductDownloadable $product
  * @param CatalogCategory $category
  */
 public function testCreateDownloadableProduct(CatalogProductDownloadable $product, CatalogCategory $category)
 {
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getProductBlock()->addProduct('downloadable');
     $productBlockForm = $this->catalogProductNew->getForm();
     $productBlockForm->fillProduct($product, $category);
     $this->catalogProductNew->getFormAction()->save();
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:14,代码来源:CreateDownloadableProductEntityTest.php

示例2: test

 /**
  * Test create bundle product
  *
  * @param CatalogProductBundle $product
  * @param CatalogCategory $category
  * @return void
  */
 public function test(CatalogProductBundle $product, CatalogCategory $category)
 {
     $this->catalogProductIndex->open();
     $this->catalogProductIndex->getGridPageActionBlock()->addProduct('bundle');
     $productBlockForm = $this->catalogProductNew->getForm();
     $productBlockForm->fill($product, null, $category);
     $this->catalogProductNew->getFormAction()->save();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:15,代码来源:CreateBundleProductEntityTest.php

示例3: testCreate

 /**
  * Run create product virtual entity test
  *
  * @param CatalogProductVirtual $product
  * @param CatalogCategory $category
  * @return void
  */
 public function testCreate(CatalogProductVirtual $product, CatalogCategory $category)
 {
     // Steps
     $this->productGrid->open();
     $this->productGrid->getProductBlock()->addProduct('virtual');
     $productBlockForm = $this->newProductPage->getForm();
     $productBlockForm->fillProduct($product, $category);
     $this->newProductPage->getFormAction()->save();
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:16,代码来源:CreateVirtualProductEntityTest.php

示例4: testCreate

 /**
  * Run create product simple entity test
  *
  * @param CatalogProductSimple $product
  * @param CatalogCategory $category
  * @return void
  */
 public function testCreate(CatalogProductSimple $product, CatalogCategory $category)
 {
     // Steps
     $this->productGrid->open();
     $this->productGrid->getGridPageActionBlock()->addProduct('simple');
     $productBlockForm = $this->newProductPage->getForm();
     $productBlockForm->fill($product, null, $category);
     $this->newProductPage->getFormAction()->save();
 }
开发者ID:aiesh,项目名称:magento2,代码行数:16,代码来源:CreateSimpleProductEntityTest.php

示例5: testCreate

 /**
  * Run create configurable product test
  *
  * @param CatalogProductConfigurable $configurable
  * @param CatalogCategory $category
  * @return void
  */
 public function testCreate(CatalogProductConfigurable $configurable, CatalogCategory $category)
 {
     // Steps
     $this->productPageGrid->open();
     $this->productPageGrid->getProductBlock()->addProduct('configurable');
     // Fill form
     $productBlockForm = $this->newProductPage->getConfigurableProductForm();
     $productBlockForm->fillProduct($configurable, $category);
     $this->newProductPage->getFormAction()->saveProduct($this->newProductPage, $configurable);
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:17,代码来源:CreateConfigurableEntityTest.php

示例6: processAssert

 /**
  * Assert that created product template:
  * 1. Displays in product template suggest container dropdown
  * 2. Can be used for new created product.
  *
  * @param FixtureFactory $fixtureFactory
  * @param CatalogProductEdit $productEdit
  * @param CatalogProductIndex $productGrid
  * @param CatalogAttributeSet $attributeSet
  * @param CatalogProductNew $newProductPage
  * @param CatalogProductAttribute $productAttribute
  * @return void
  */
 public function processAssert(FixtureFactory $fixtureFactory, CatalogProductEdit $productEdit, CatalogProductIndex $productGrid, CatalogAttributeSet $attributeSet, CatalogProductNew $newProductPage, CatalogProductAttribute $productAttribute)
 {
     $productGrid->open();
     $productGrid->getProductBlock()->addProduct('simple');
     $productBlockForm = $newProductPage->getForm();
     /**@var CatalogProductSimple $catalogProductSimple */
     $productSimple = $fixtureFactory->createByCode('catalogProductSimple', ['dataSet' => 'default', 'data' => ['attribute_set_id' => ['attribute_set' => $attributeSet]]]);
     $productBlockForm->fillProduct($productSimple);
     $newProductPage->getFormAction()->save();
     $formData = $productEdit->getForm()->getData($productSimple);
     $formAttributeSet = $formData['attribute_set_id'];
     \PHPUnit_Framework_Assert::assertEquals($attributeSet->getAttributeSetName(), $formAttributeSet, 'Attribute Set not found on Product form.' . "\nExpected: " . $attributeSet->getAttributeSetName() . "\nActual: " . $formAttributeSet);
     $productEdit->getForm()->openTab('product-details');
     \PHPUnit_Framework_Assert::assertTrue($productEdit->getForm()->checkAttributeLabel($productAttribute), "Product Attribute is absent on Product form.");
 }
开发者ID:Atlis,项目名称:docker-magento2,代码行数:28,代码来源:AssertProductTemplateOnProductForm.php


注:本文中的Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew::getFormAction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。