File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
dev/tests/functional/lib/Magento/Mtf/Util/Command/Cli Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ namespace Magento \Mtf \Util \Command \Cli ;
8
+
9
+ use Magento \Mtf \Util \Command \Cli ;
10
+
11
+ /**
12
+ * Handle set configuration for test execution.
13
+ */
14
+ class Config extends Cli
15
+ {
16
+ /**
17
+ * Parameter for reindex command.
18
+ */
19
+ const PARAM_CONFIG_SET = 'config:set ' ;
20
+
21
+ /**
22
+ * Set configuration.
23
+ *
24
+ * @param string $path
25
+ * @param string $value
26
+ * @param string|null $scope
27
+ * @param string|null $scopeCode
28
+ * @return void
29
+ */
30
+ public function setConfig ($ path , $ value , $ scope = null , $ scopeCode = null )
31
+ {
32
+ $ configurationString = '' ;
33
+
34
+ if ($ scope !== null ) {
35
+ $ configurationString .= sprintf ('--scope=%s ' , $ scope );
36
+ }
37
+
38
+ if ($ scopeCode !== null ) {
39
+ $ configurationString .= sprintf ('--scope-code=%s ' , $ scopeCode );
40
+ }
41
+ $ configurationString .= sprintf ('%s %s ' , $ path , $ value );
42
+
43
+ parent ::execute (Config::PARAM_CONFIG_SET . ' ' . $ configurationString );
44
+ }
45
+ }
You can’t perform that action at this time.
0 commit comments