File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
dev/tests/integration/bin Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env php
2
+ <?php
3
+ /**
4
+ * Copyright © Magento, Inc. All rights reserved.
5
+ * See COPYING.txt for license details.
6
+ */
7
+
8
+ if (PHP_SAPI !== 'cli ' ) {
9
+ echo 'bin/magento must be run as a CLI application ' ;
10
+ exit (1 );
11
+ }
12
+
13
+ if (isset ($ _SERVER ['INTEGRATION_TEST_PARAMS ' ])) {
14
+ parse_str ($ _SERVER ['INTEGRATION_TEST_PARAMS ' ], $ params );
15
+ foreach ($ params as $ paramName => $ paramValue ) {
16
+ $ _SERVER [$ paramName ] = $ paramValue ;
17
+ }
18
+ } else {
19
+ echo 'Test parameters are required ' ;
20
+ exit (1 );
21
+ }
22
+
23
+ try {
24
+ require $ _SERVER ['MAGE_DIRS ' ]['base ' ]['path ' ] . '/app/bootstrap.php ' ;
25
+ } catch (\Exception $ e ) {
26
+ echo 'Autoload error: ' . $ e ->getMessage ();
27
+ exit (1 );
28
+ }
29
+ try {
30
+ $ handler = new \Magento \Framework \App \ErrorHandler ();
31
+ set_error_handler ([$ handler , 'handler ' ]);
32
+ $ application = new Magento \Framework \Console \Cli ('Magento CLI ' );
33
+ $ application ->run ();
34
+ } catch (\Exception $ e ) {
35
+ while ($ e ) {
36
+ echo $ e ->getMessage ();
37
+ echo $ e ->getTraceAsString ();
38
+ echo "\n\n" ;
39
+ $ e = $ e ->getPrevious ();
40
+ }
41
+ exit (Cli::RETURN_FAILURE );
42
+ }
You can’t perform that action at this time.
0 commit comments