diff --git a/.travis.yml b/.travis.yml index f795e8d..4ff308c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,6 @@ php: - "5.5" install: - - composer require mikey179/vfsStream:1.2.0 + - composer config vendor-dir .composer require mikey179/vfsStream:1.2.0 script: phpunit --bootstrap ./tests/bootstrap.php ./tests diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..7c45ec0 --- /dev/null +++ b/composer.json @@ -0,0 +1,8 @@ +{ + "config": { + "vendor-dir": ".composer" + }, + "require": { + "mikey179/vfsStream": "1.2.0" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..510f2e3 --- /dev/null +++ b/composer.lock @@ -0,0 +1,55 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" + ], + "hash": "43a9d6fa1fc1d241f48c50222da238c8", + "packages": [ + { + "name": "mikey179/vfsStream", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/mikey179/vfsStream.git", + "reference": "063fb10633f10c5ccbcac26227e94f46d9336f90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mikey179/vfsStream/zipball/063fb10633f10c5ccbcac26227e94f46d9336f90", + "reference": "063fb10633f10c5ccbcac26227e94f46d9336f90", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "org\\bovigo\\vfs\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "homepage": "http://vfs.bovigo.org/", + "time": "2013-04-01 10:41:02" + } + ], + "packages-dev": [ + + ], + "aliases": [ + + ], + "minimum-stability": "stable", + "stability-flags": [ + + ], + "platform": [ + + ], + "platform-dev": [ + + ] +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index b8d1a52..7e264ba 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -2,26 +2,10 @@ ob_start(); -$vfs_files = [ - '/usr/local/Cellar/php55/5.5.7/lib/php/vfsStream/vfsStream.php', - './vendor/autoload.php', -]; +require_once '.composer/autoload.php'; -echo getcwd(); -print_r(scandir(getcwd())); - -foreach ($vfs_files as $vfs_file) -{ - echo $vfs_file; - if (file_exists($vfs_file)) - { - echo 'loaded'; - require_once $vfs_file; - } -} - -$root = vfsStream::setup('site'); -define('SITE_PATH', vfsStream::url('site/')); +$root = org\bovigo\vfs\vfsStream::setup('site'); +define('SITE_PATH', org\bovigo\vfs\vfsStream::url('site/')); require_once 'classes/Object.php'; require_once 'classes/Config.php';