EcomDev_PHPUnit icon indicating copy to clipboard operation
EcomDev_PHPUnit copied to clipboard

Compatibility magento EE1.13 and EE1.14

Open spras opened this issue 9 years ago • 2 comments

Seem to have problem with product fixtures : the stock status is not well indexed and the product isn't available.

spras avatar Apr 29 '15 13:04 spras

I'm able to run tests with products on EE1.13 and EE1.14

Here is my yaml:

scope:
  website:
    - website_id: 1
      code: english_website
      name: English Website
      default_group_id: 1
  group:
    - group_id: 1
      website_id: 1
      name: English Store group
      default_store_id: 1
      root_category_id: 1
  store:
    - store_id: 1
      website_id: 1
      group_id: 1
      code: uk
      name: English Store
      is_active: 1
config:
  default/catalog/price/scope: 1
  default/dev/template/allow_symlink: 1
  stores/default/dev/template/allow_symlink: 1
  stores/admin/dev/template/allow_symlink: 1
  stores/french/dev/template/allow_symlink: 1
  stores/german/dev/template/allow_symlink: 1
  websites/admin/dev/template/allow_symlink: 1
  websites/base/dev/template/allow_symlink: 1
  default/carriers/freeshipping/active: 1
  default/payment/fivory/active: 1
  default/payment/fivory/point_of_sale_id: 4444444444
  default/payment/fivory/point_of_sale_key: 4444444444444444444444444444444444444444
eav:
  customer:
    - entity_id: 1
      email: [email protected]
      password_hash: ''
  catalog_product:
    - entity_id: 1
      type_id: simple
      sku: book
      name: Book
      short_description: Book
      description: Book
      attribute_set_id: 4 # Product entity
      url_key: book
      stock:
        qty: 100.00
        is_in_stock: 1
      website_ids:
        - english_website
      /websites:
        english_website:
          special_price: 7.99
      category_ids:
        - 1 # Default Category
      price: 12.99
      tax_class_id: 2 # Taxable Goods
      status: 1 # Enabled
      visibility: 4 # Visible in Catalog & Search

edi9999 avatar Apr 30 '15 13:04 edi9999

Yes, but the product isSalable() method return false

It’s not like this on magento CE or magento EE<1.13 versions.

As a workaround, i do this on the begining of the test and isSalable() returns true.

$product = Mage::getModel('catalog/product')->load(1); $product->getStockItem()->setQty(100)->save();

I think the stock indexing has changed in theses version and the ecomdev module doesn’t handle it correctly.

Sylvain PRAS.

De : Edgar Hipp <[email protected]mailto:[email protected]> Répondre à : EcomDev/EcomDev_PHPUnit <[email protected]mailto:[email protected]> Date : jeudi 30 avril 2015 15:30 À : EcomDev/EcomDev_PHPUnit <[email protected]mailto:[email protected]> Cc : Sylvain PRAS <[email protected]mailto:[email protected]> Objet : Re: [EcomDev_PHPUnit] Compatibility magento EE1.13 and EE1.14 (#253)

I'm able to run tests with products on EE1.13 and EE1.14

Here is my yaml:

scope: website: - website_id: 1 code: english_website name: English Website default_group_id: 1 group: - group_id: 1 website_id: 1 name: English Store group default_store_id: 1 root_category_id: 1 store: - store_id: 1 website_id: 1 group_id: 1 code: uk name: English Store is_active: 1 config: default/catalog/price/scope: 1 default/dev/template/allow_symlink: 1 stores/default/dev/template/allow_symlink: 1 stores/admin/dev/template/allow_symlink: 1 stores/french/dev/template/allow_symlink: 1 stores/german/dev/template/allow_symlink: 1 websites/admin/dev/template/allow_symlink: 1 websites/base/dev/template/allow_symlink: 1 default/carriers/freeshipping/active: 1 default/payment/fivory/active: 1 default/payment/fivory/point_of_sale_id: 4444444444 default/payment/fivory/point_of_sale_key: 4444444444444444444444444444444444444444 eav: customer: - entity_id: 1 email: [email protected]:[email protected] password_hash: '' catalog_product: - entity_id: 1 type_id: simple sku: book name: Book short_description: Book description: Book attribute_set_id: 4 # Product entity url_key: book stock: qty: 100.00 is_in_stock: 1 website_ids: - english_website /websites: english_website: special_price: 7.99 category_ids: - 1 # Default Category price: 12.99 tax_class_id: 2 # Taxable Goods status: 1 # Enabled visibility: 4 # Visible in Catalog & Search

— Reply to this email directly or view it on GitHubhttps://github.com/EcomDev/EcomDev_PHPUnit/issues/253#issuecomment-97785827.

spras avatar Apr 30 '15 15:04 spras