diff --git a/bin/hrphp b/bin/hrphp index 7a34f7e..2814540 100755 --- a/bin/hrphp +++ b/bin/hrphp @@ -9,13 +9,13 @@ // set the default time zone, just in case date_default_timezone_set('America/New_York'); + // define some application constants if (!defined('APPLICATION_ENV')) { define('APPLICATION_ENV', 'production'); } - define('APPLICATION_PATH', dirname(__DIR__)); -chdir(APPLICATION_PATH); +define('HRPHP_URL', 'http://hrphp.org'); // load dependencies! require APPLICATION_PATH . '/vendor/autoload.php'; diff --git a/src/config/application.php b/src/config/application.php index b5f0b63..7033c90 100644 --- a/src/config/application.php +++ b/src/config/application.php @@ -10,10 +10,6 @@ use Hrphp\Cli\Command\PingCommand; use GuzzleHttp\Client as GuzzleClient; -// portal URL -define('HRPHP_URL', 'http://hrphp.org'); - -// configure the application try { $client = new GuzzleClient(); $application = new Application('HRPHP CLI', '@package_version@'); diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 4ba5fb4..721a4ad 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -11,7 +11,7 @@ define('APPLICATION_ENV', 'test'); define('APPLICATION_PATH', dirname(__DIR__)); -chdir(APPLICATION_PATH); +define('HRPHP_URL', 'http://hrphp.org'); require 'vendor/autoload.php'; require 'src/config/application.php';