Skip to content

Commit

Permalink
Update Autoload
Browse files Browse the repository at this point in the history
  • Loading branch information
KanDisheng committed Sep 7, 2017
1 parent b103e5f commit d774a73
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root=true

[*]
charset=utf-8
end_of_line=crlf
indent_style=space
indent_size=2
insert_final_newline=false
trim_trailing_whitespace=true

[*.php]
indent_size=4
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
before_script:
- composer install
script:
- vendor/bin/phpunit -v
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "codemommy/webphp",
"version": "0.0.17",
"version": "0.0.18",
"description": "Web MVC framework of light and fast",
"keywords": [
"CodeMommy",
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<phpunit>
<phpunit bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="CodeMommy WebPHP">
<directory>test</directory>
Expand Down
6 changes: 3 additions & 3 deletions system/core/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public static function start($path)
}
}
// Other
Autoload::load(APPLICATION_ROOT . '/controller', 'Controller');
Autoload::load(APPLICATION_ROOT . '/model', 'Model');
Autoload::load(APPLICATION_ROOT, '');
Autoload::directory(APPLICATION_ROOT . '/controller', 'Controller');
Autoload::directory(APPLICATION_ROOT . '/model', 'Model');
Autoload::directory(APPLICATION_ROOT, '');
Cache::setConfig(Config::get('cache'));
Route::start();
return true;
Expand Down
2 changes: 1 addition & 1 deletion test/DateTimeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

declare(strict_types=1);

require_once(__DIR__ . '/../vendor/autoload.php');
namespace Test;

use PHPUnit\Framework\TestCase;
use CodeMommy\WebPHP\DateTime;
Expand Down

0 comments on commit d774a73

Please sign in to comment.