Added testing structure and bootstrap class.

This commit is contained in:
Robert Hafner 2012-06-11 00:06:19 -07:00
parent 4eaec14f17
commit 22eaf7238b
4 changed files with 96 additions and 0 deletions

View File

@ -0,0 +1,22 @@
<?php
/*
* This file is part of the Fetch library.
*
* (c) Robert Hafner <tedivm@tedivm.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fetch\Test;
/**
* @package Fetch
* @author Robert Hafner <tedivm@tedivm.com>
*/
class AttachmentTest extends \PHPUnit_Framework_TestCase
{
}

View File

@ -0,0 +1,22 @@
<?php
/*
* This file is part of the Fetch library.
*
* (c) Robert Hafner <tedivm@tedivm.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fetch\Test;
/**
* @package Fetch
* @author Robert Hafner <tedivm@tedivm.com>
*/
class MessageTest extends \PHPUnit_Framework_TestCase
{
}

View File

@ -0,0 +1,22 @@
<?php
/*
* This file is part of the Fetch library.
*
* (c) Robert Hafner <tedivm@tedivm.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Fetch\Test;
/**
* @package Fetch
* @author Robert Hafner <tedivm@tedivm.com>
*/
class ServerTest extends \PHPUnit_Framework_TestCase
{
}

30
tests/bootstrap.php Normal file
View File

@ -0,0 +1,30 @@
<?php
/*
* This file is part of the Stash package.
*
* (c) Robert Hafner <tedivm@tedivm.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
define('TESTING', true);
error_reporting(-1);
spl_autoload_register(function($class) {
if (0 === strpos($class, 'Fetch\\Test\\')) {
$file = __DIR__ . '/../tests/' . str_replace('\\', '/', $class) . '.php';
if (file_exists($file)) {
require_once $file;
return true;
}
} elseif (0 === strpos($class, 'Fetch\\')) {
$file = __DIR__ . '/../src/' . str_replace('\\', '/', $class) . '.php';
if (file_exists($file)) {
require_once $file;
return true;
}
}
});