Magento EcomDev PHPUnit未加载客户装置

时间:2013-04-09 05:00:00

标签: magento phpunit

我有一个案例,我想检查数据库中是否已存在客户。我为此创建了一个fixture文件:

scope:
  website:
    - website_id: 1
      code: main
      name: Main Website
      default_group_id: 1
  group:
    - group_id: 1
      website_id: 1
      name: Main Website Store
      root_category_id: 8
      default_store_id: 1
  store:
    - store_id: 1
      code: default
      website_id: 1
      group_id: 1
      name: Default Store View
      is_active: 1
eav:
  customer:
    - entity_id: 13
      entity_type_id: 1
      website_id: 1
      email: example@example.com
      group_id: 1
      store_id: 1
      is_active: 1
      firstname: john
      lastname: smith

当我运行测试时,我收到错误:

Zend_Db_Statement_Exception: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'sort_order' in order clause is ambiguous

这个错误只发生在我加载灯具时,所以我认为它与Model_Fixture_Eav类有关。我不确定我应该为客户创建EAV模型的方法。有没有人设法成功导入客户设备?

1 个答案:

答案 0 :(得分:3)

eav:
    customer:
        - entity_id: 13
          entity_type_id: 1
          attribute_set_id: 0
          website_id: 1
          email: example@example.com
          group_id: 1
          store_id: 1
          is_active: 1
          firstname: john
          lastname: smith