Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CategorySetupTest.php
Go to the documentation of this file.
1 <?php
7 
8 class CategorySetupTest extends \PHPUnit\Framework\TestCase
9 {
11  protected $unit;
12 
13  protected function setUp()
14  {
15  $this->unit = (new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this))->getObject(
16  \Magento\Catalog\Setup\CategorySetup::class
17  );
18  }
19 
21  {
22  $defaultEntities = $this->unit->getDefaultEntities();
23 
24  $this->assertEquals(
25  [
26  'name',
27  'is_active',
28  'description',
29  'image',
30  'meta_title',
31  'meta_keywords',
32  'meta_description',
33  'display_mode',
34  'landing_page',
35  'is_anchor',
36  'path',
37  'position',
38  'all_children',
39  'path_in_store',
40  'children',
41  'custom_design',
42  'custom_design_from',
43  'custom_design_to',
44  'page_layout',
45  'custom_layout_update',
46  'level',
47  'children_count',
48  'available_sort_by',
49  'default_sort_by',
50  'include_in_menu',
51  'custom_use_parent_settings',
52  'custom_apply_to_products',
53  'filter_price_range',
54  ],
55  array_keys($defaultEntities['catalog_category']['attributes'])
56  );
57 
58  $this->assertEquals(
59  [
60  'name',
61  'sku',
62  'description',
63  'short_description',
64  'price',
65  'special_price',
66  'special_from_date',
67  'special_to_date',
68  'cost',
69  'weight',
70  'manufacturer',
71  'meta_title',
72  'meta_keyword',
73  'meta_description',
74  'image',
75  'small_image',
76  'thumbnail',
77  'media_gallery',
78  'old_id',
79  'tier_price',
80  'color',
81  'news_from_date',
82  'news_to_date',
83  'gallery',
84  'status',
85  'minimal_price',
86  'visibility',
87  'custom_design',
88  'custom_design_from',
89  'custom_design_to',
90  'custom_layout_update',
91  'page_layout',
92  'category_ids',
93  'options_container',
94  'required_options',
95  'has_options',
96  'image_label',
97  'small_image_label',
98  'thumbnail_label',
99  'created_at',
100  'updated_at',
101  'country_of_manufacture',
102  'quantity_and_stock_status',
103  ],
104  array_keys($defaultEntities['catalog_product']['attributes'])
105  );
106  }
107 }