feat: add e2e testing for both menu links. Also fixed some e2e stuff. (#7739)
[openemr.git] / bin / console
blob32b08d3a506e53ca6be6cb940e9c19a24e848e25
1 #!/usr/bin/php
2 <?php
4 /**
5 * bin/console
7 * @package OpenEMR
8 * @link https://www.open-emr.org
9 * @author Brady Miller <Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2022 Brady Miller <Brady Miller <brady.g.miller@gmail.com>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
14 if (php_sapi_name() !== 'cli') {
15 echo "Only php cli can execute a command\n";
16 die();
19 $siteDefault = 'default';
20 foreach ($argv as $arg) {
21 if (str_contains($arg, "--site=")) {
22 $siteDefault = explode("=", $arg)[1];
25 $_GET['site'] = $siteDefault;
27 $ignoreAuth = true;
28 // Since from command line, set $sessionAllowWrite since need to set site_id session and no benefit to set to false
29 $sessionAllowWrite = true;
30 require_once __DIR__ . '/../interface/globals.php';
32 $commandRunner = new \OpenEMR\Common\Command\SymfonyCommandRunner();
33 $commandRunner->run();