File tree 6 files changed +4
-8
lines changed
6 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ class DefaultConfiguration {
11
11
* @throws ApplicationPartMissingException
12
12
*/
13
13
public static function initialize ($ application ) {
14
- $ project_root = isset ($ _ENV ['AppZap\PHPFramework\ProjectRoot ' ]) ? $ _ENV ['AppZap\PHPFramework\ProjectRoot ' ] : dirname ( $ _SERVER [ ' DOCUMENT_ROOT ' ] . $ _SERVER [ ' PHP_SELF ' ] );
14
+ $ project_root = isset ($ _ENV ['AppZap\PHPFramework\ProjectRoot ' ]) ? $ _ENV ['AppZap\PHPFramework\ProjectRoot ' ] : getcwd ( );
15
15
$ application_directory_path = $ project_root . '/ ' . $ application ;
16
16
$ application_directory = realpath ($ application_directory_path );
17
17
if (!is_dir ($ application_directory )) {
Original file line number Diff line number Diff line change 2
2
namespace AppZap \PHPFramework \Mvc ;
3
3
4
4
use AppZap \PHPFramework \Cache \CacheFactory ;
5
- use AppZap \PHPFramework \Configuration \Configuration ;
6
- use AppZap \PHPFramework \Cache \Cache ;
7
5
use AppZap \PHPFramework \Mvc \View \TwigView ;
8
6
use AppZap \PHPFramework \SignalSlot \Dispatcher as SignalSlotDispatcher ;
9
7
Original file line number Diff line number Diff line change 1
1
<?php
2
2
require_once 'vendor/autoload.php';
3
3
4
- # $_ENV['AppZap\PHPFramework\ProjectRoot'] = dirname(__FILE__);
5
-
6
4
$application = 'myapp';
7
5
\AppZap\PHPFramework\Bootstrap::bootstrap($application);
Original file line number Diff line number Diff line change 6
6
class AppTest extends \PHPUnit_Framework_TestCase {
7
7
8
8
public function setUp () {
9
- $ _ENV ['AppZap\PHPFramework\ProjectRoot ' ] = dirname ( __FILE__ ) ;
9
+ $ _ENV ['AppZap\PHPFramework\ProjectRoot ' ] = __DIR__ ;
10
10
}
11
11
12
12
/**
Original file line number Diff line number Diff line change 8
8
class DefaultConfigurationTest extends \PHPUnit_Framework_TestCase {
9
9
10
10
public function setUp () {
11
- $ _ENV ['AppZap\PHPFramework\ProjectRoot ' ] = dirname ( __FILE__ ) ;
11
+ $ _ENV ['AppZap\PHPFramework\ProjectRoot ' ] = __DIR__ ;
12
12
Configuration::reset ();
13
13
}
14
14
Original file line number Diff line number Diff line change 8
8
class IniParserTest extends \PHPUnit_Framework_TestCase {
9
9
10
10
public function setUp () {
11
- $ _ENV ['AppZap\PHPFramework\ProjectRoot ' ] = dirname ( __FILE__ ) ;
11
+ $ _ENV ['AppZap\PHPFramework\ProjectRoot ' ] = __DIR__ ;
12
12
Configuration::reset ();
13
13
}
14
14
You can’t perform that action at this time.
0 commit comments