diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..ef89000 --- /dev/null +++ b/.editorconfig @@ -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 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..809511f --- /dev/null +++ b/.travis.yml @@ -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 \ No newline at end of file diff --git a/composer.json b/composer.json index ba6c723..99101b0 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/phpunit.xml b/phpunit.xml index 29a3100..c7d6e72 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,4 +1,4 @@ - + test diff --git a/system/core/Application.php b/system/core/Application.php index 242c3ad..7b80726 100644 --- a/system/core/Application.php +++ b/system/core/Application.php @@ -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; diff --git a/test/DateTimeTest.php b/test/DateTimeTest.php index 380a879..5e86dc5 100644 --- a/test/DateTimeTest.php +++ b/test/DateTimeTest.php @@ -7,7 +7,7 @@ declare(strict_types=1); -require_once(__DIR__ . '/../vendor/autoload.php'); +namespace Test; use PHPUnit\Framework\TestCase; use CodeMommy\WebPHP\DateTime;