EcomDev PHPUnit&x27;实体Id应在EAV夹具中指定'; 高级/基础/测试/模型/测试/夹具/价格计算.yaml
尝试加载一个fixture,到目前为止,它处理EAV中实体id的所有内容。我在顶部得到错误在这些行中添加两个空格:EcomDev PHPUnit&x27;实体Id应在EAV夹具中指定'; 高级/基础/测试/模型/测试/夹具/价格计算.yaml,php,magento,phpunit,yaml,Php,Magento,Phpunit,Yaml,尝试加载一个fixture,到目前为止,它处理EAV中实体id的所有内容。我在顶部得到错误在这些行中添加两个空格: scope: website: # Initialize websites - website_id: 2 code: usa_website name: USA Website default_group_id: 2 - website_id: 3 code: canada_website name:
scope:
website: # Initialize websites
- website_id: 2
code: usa_website
name: USA Website
default_group_id: 2
- website_id: 3
code: canada_website
name: Canada Website
default_group_id: 3
- website_id: 4
code: german_website
name: German Website
default_group_id: 4
group: # Initializes store groups
- group_id: 2
website_id: 2
name: USA Store Group
default_store_id: 2
root_category_id: 2 # Default Category
- group_id: 3
website_id: 3
name: Canada Store Group
default_store_id: 3
root_category_id: 2 # Default Category
- group_id: 4
website_id: 4
name: German Store Group
default_store_id: 4
root_category_id: 2 # Default Category
store: # Initializes store views
- store_id: 2
website_id: 2
group_id: 2
code: usa
name: USA Store
is_active: 1
- store_id: 3
website_id: 3
group_id: 3
code: canada
name: Canada Store
is_active: 1
- store_id: 4
website_id: 4
group_id: 4
code: germany
name: Germany
is_active: 1
config:
default/catalog/price/scope: 1 # Set price scope to website
eav:
catalog_product:
- entity_id: 1
type_id: simple
sku: book
name: Book
short_description: Book
description: Book
url_key: book
stock:
qty: 100.00
is_in_stock: 1
website_ids:
- usa_website
- canada_website
- german_website
category_ids:
- 2 # Default Category
price: 12.99
tax_class_id: 2 # Taxable Goods
status: 1 # Enabled
visibility: 4 # Visible in Catalog & Search
/websites: # Set different prices per website
usa_website:
special_price: 9.99
german_website:
price: 9.99
special_price: 5.99
此数据属于实体id为1的产品。因此,您必须缩进这些行,使它们成为产品定义的一部分。它们应具有与类型_id
或网站_id
相同的缩进
scope:
website: # Initialize websites
- website_id: 2
code: usa_website
name: USA Website
default_group_id: 2
- website_id: 3
code: canada_website
name: Canada Website
default_group_id: 3
- website_id: 4
code: german_website
name: German Website
default_group_id: 4
group: # Initializes store groups
- group_id: 2
website_id: 2
name: USA Store Group
default_store_id: 2
root_category_id: 2 # Default Category
- group_id: 3
website_id: 3
name: Canada Store Group
default_store_id: 3
root_category_id: 2 # Default Category
- group_id: 4
website_id: 4
name: German Store Group
default_store_id: 4
root_category_id: 2 # Default Category
store: # Initializes store views
- store_id: 2
website_id: 2
group_id: 2
code: usa
name: USA Store
is_active: 1
- store_id: 3
website_id: 3
group_id: 3
code: canada
name: Canada Store
is_active: 1
- store_id: 4
website_id: 4
group_id: 4
code: germany
name: Germany
is_active: 1
config:
default/catalog/price/scope: 1 # Set price scope to website
eav:
catalog_product:
- entity_id: 1
type_id: simple
sku: book
name: Book
short_description: Book
description: Book
url_key: book
stock:
qty: 100.00
is_in_stock: 1
website_ids:
- usa_website
- canada_website
- german_website
category_ids:
- 2 # Default Category
price: 12.99
tax_class_id: 2 # Taxable Goods
status: 1 # Enabled
visibility: 4 # Visible in Catalog & Search
/websites: # Set different prices per website
usa_website:
special_price: 9.99
german_website:
price: 9.99
special_price: 5.99
category_ids:
- 2 # Default Category
price: 12.99
tax_class_id: 2 # Taxable Goods
status: 1 # Enabled
visibility: 4 # Visible in Catalog & Search
/websites: # Set different prices per website
usa_website:
special_price: 9.99
german_website:
price: 9.99
special_price: 5.99