11# Testing Guide: Copy From Vendor Command
22
3- This guide describes how to test the ` mageforge:theme: copy-from-vendor ` command with different theme types and scenarios.
3+ This guide describes how to test the ` mageforge:copy:template ` command with different theme types and scenarios.
44
55## Automated Tests
66
@@ -26,7 +26,7 @@ ddev magento setup:upgrade
2626
2727``` bash
2828# Test with view/frontend file
29- ddev magento mageforge:theme: copy-from-vendor \
29+ ddev magento mageforge:copy:template \
3030 vendor/magento/module-catalog/view/frontend/templates/product/list.phtml \
3131 Magento/luma \
3232 --dry-run
@@ -38,7 +38,7 @@ ddev magento mageforge:theme:copy-from-vendor \
3838
3939``` bash
4040# Test with view/base file (should work with frontend theme)
41- ddev magento mageforge:theme: copy-from-vendor \
41+ ddev magento mageforge:copy:template \
4242 vendor/magento/module-theme/view/base/web/css/print.css \
4343 Magento/blank \
4444 --dry-run
@@ -50,7 +50,7 @@ ddev magento mageforge:theme:copy-from-vendor \
5050
5151``` bash
5252# Test with Hyvä-specific file
53- ddev magento mageforge:theme: copy-from-vendor \
53+ ddev magento mageforge:copy:template \
5454 vendor/hyva-themes/magento2-default-theme/Magento_Catalog/templates/product/list/item.phtml \
5555 Hyva/default \
5656 --dry-run
@@ -64,7 +64,7 @@ ddev magento mageforge:theme:copy-from-vendor \
6464
6565``` bash
6666# Test with view/adminhtml file
67- ddev magento mageforge:theme: copy-from-vendor \
67+ ddev magento mageforge:copy:template \
6868 vendor/magento/module-backend/view/adminhtml/templates/page/header.phtml \
6969 Magento/backend \
7070 --dry-run
@@ -76,7 +76,7 @@ ddev magento mageforge:theme:copy-from-vendor \
7676
7777``` bash
7878# Test with view/base file (should work with adminhtml theme)
79- ddev magento mageforge:theme: copy-from-vendor \
79+ ddev magento mageforge:copy:template \
8080 vendor/magento/module-ui/view/base/web/js/grid/columns/column.js \
8181 Magento/backend \
8282 --dry-run
@@ -90,7 +90,7 @@ ddev magento mageforge:theme:copy-from-vendor \
9090
9191``` bash
9292# This should FAIL with clear error message
93- ddev magento mageforge:theme: copy-from-vendor \
93+ ddev magento mageforge:copy:template \
9494 vendor/magento/module-catalog/view/frontend/templates/product/list.phtml \
9595 Magento/backend \
9696 --dry-run
@@ -102,7 +102,7 @@ ddev magento mageforge:theme:copy-from-vendor \
102102
103103``` bash
104104# This should FAIL with clear error message
105- ddev magento mageforge:theme: copy-from-vendor \
105+ ddev magento mageforge:copy:template \
106106 vendor/magento/module-backend/view/adminhtml/templates/dashboard.phtml \
107107 Magento/luma \
108108 --dry-run
@@ -114,7 +114,7 @@ ddev magento mageforge:theme:copy-from-vendor \
114114
115115``` bash
116116# This should FAIL with clear error message
117- ddev magento mageforge:theme: copy-from-vendor \
117+ ddev magento mageforge:copy:template \
118118 vendor/magento/module-catalog/etc/di.xml \
119119 Magento/luma \
120120 --dry-run
@@ -126,7 +126,7 @@ ddev magento mageforge:theme:copy-from-vendor \
126126
127127``` bash
128128# This should FAIL with clear error message
129- ddev magento mageforge:theme: copy-from-vendor \
129+ ddev magento mageforge:copy:template \
130130 vendor/magento/module-catalog/view/frontend/templates/nonexistent.phtml \
131131 Magento/luma \
132132 --dry-run
@@ -140,7 +140,7 @@ ddev magento mageforge:theme:copy-from-vendor \
140140
141141``` bash
142142# Test interactive theme selection (omit theme argument)
143- ddev magento mageforge:theme: copy-from-vendor \
143+ ddev magento mageforge:copy:template \
144144 vendor/magento/module-catalog/view/frontend/templates/product/view.phtml \
145145 --dry-run
146146
@@ -157,7 +157,7 @@ ddev magento mageforge:theme:copy-from-vendor \
157157
158158``` bash
159159# Copy a file that doesn't exist in theme yet
160- ddev magento mageforge:theme: copy-from-vendor \
160+ ddev magento mageforge:copy:template \
161161 vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar.phtml \
162162 Magento/luma
163163
@@ -171,7 +171,7 @@ ddev magento mageforge:theme:copy-from-vendor \
171171
172172``` bash
173173# Copy to same location again
174- ddev magento mageforge:theme: copy-from-vendor \
174+ ddev magento mageforge:copy:template \
175175 vendor/magento/module-catalog/view/frontend/templates/product/list/toolbar.phtml \
176176 Magento/luma
177177
@@ -238,16 +238,16 @@ The command should be tested in CI/CD pipeline:
238238- name : Test Copy Command
239239 run : |
240240 # Test basic functionality
241- bin/magento mageforge:theme: copy-from-vendor --help
241+ bin/magento mageforge:copy:template --help
242242
243243 # Test dry-run mode
244- bin/magento mageforge:theme: copy-from-vendor \
244+ bin/magento mageforge:copy:template \
245245 vendor/magento/module-catalog/view/frontend/templates/product/list.phtml \
246246 Magento/luma \
247247 --dry-run
248248
249249 # Test error handling
250- if bin/magento mageforge:theme: copy-from-vendor \
250+ if bin/magento mageforge:copy:template \
251251 vendor/magento/module-catalog/etc/di.xml \
252252 Magento/luma \
253253 --dry-run 2>&1 | grep -q "not under a view"; then
@@ -285,7 +285,7 @@ For large files or batch operations:
285285
286286``` bash
287287# Time the operation
288- time ddev magento mageforge:theme: copy-from-vendor \
288+ time ddev magento mageforge:copy:template \
289289 vendor/magento/module-catalog/view/frontend/layout/catalog_product_view.xml \
290290 Magento/luma \
291291 --dry-run
@@ -302,7 +302,7 @@ After each deployment or environment update:
302302ddev magento dev:tests:run unit vendor/openforgeproject/mageforge/Test/
303303
304304# Run smoke test
305- ddev magento mageforge:theme: copy-from-vendor \
305+ ddev magento mageforge:copy:template \
306306 vendor/magento/module-theme/view/frontend/templates/page/copyright.phtml \
307307 Magento/luma \
308308 --dry-run
0 commit comments