mirror of
https://github.com/retailcrm/Fetch.git
synced 2025-02-06 02:39:21 +03:00
Added testing structure and bootstrap class.
This commit is contained in:
parent
4eaec14f17
commit
22eaf7238b
22
tests/Fetch/Test/AttachmentTest.php
Normal file
22
tests/Fetch/Test/AttachmentTest.php
Normal 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
|
||||
{
|
||||
|
||||
}
|
22
tests/Fetch/Test/MessageTest.php
Normal file
22
tests/Fetch/Test/MessageTest.php
Normal 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
|
||||
{
|
||||
|
||||
}
|
22
tests/Fetch/Test/ServerTest.php
Normal file
22
tests/Fetch/Test/ServerTest.php
Normal 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
30
tests/bootstrap.php
Normal 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;
|
||||
}
|
||||
}
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user