Autoload dependencies with autoloader in bootstrap.php

This commit is contained in:
Alex Bilbie 2013-01-02 22:32:49 +00:00
parent b10613c5e3
commit 5f1779c4e7
4 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<phpunit colors="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"> <phpunit colors="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" bootstrap="../tests/Bootstrap.php">
<testsuites> <testsuites>
<testsuite name="Authentication Server"> <testsuite name="Authentication Server">
<directory suffix="test.php">../tests/authentication</directory> <directory suffix="test.php">../tests/authentication</directory>

6
tests/Bootstrap.php Normal file
View File

@ -0,0 +1,6 @@
<?php
if ( ! @include_once __DIR__ . '/../vendor/autoload.php')
{
exit("You must set up the project dependencies, run the following commands:\n> wget http://getcomposer.org/composer.phar\n> php composer.phar install\n");
}

View File

@ -1,8 +1,5 @@
<?php <?php
require_once 'src/OAuth2/Authentication/Server.php';
require_once 'src/OAuth2/Authentication/Database.php';
class Authentication_Server_test extends PHPUnit_Framework_TestCase class Authentication_Server_test extends PHPUnit_Framework_TestCase
{ {
public function setUp() public function setUp()

View File

@ -1,8 +1,5 @@
<?php <?php
require_once 'src/OAuth2/Resource/Server.php';
require_once 'src/OAuth2/Resource/Database.php';
class Resource_Server_test extends PHPUnit_Framework_TestCase { class Resource_Server_test extends PHPUnit_Framework_TestCase {
function setUp() function setUp()