mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 08:15:14 +00:00
restructure tests, use composer to autoload test requirements
This commit is contained in:
parent
8a7f11f906
commit
8d6da21473
@ -2,3 +2,5 @@ language: php
|
|||||||
php:
|
php:
|
||||||
- 5.3
|
- 5.3
|
||||||
- 5.4
|
- 5.4
|
||||||
|
before_script:
|
||||||
|
- composer install --dev
|
@ -1,7 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit backupGlobals="false"
|
<phpunit backupGlobals="false"
|
||||||
|
bootstrap="test/bootstrap.php"
|
||||||
backupStaticAttributes="false"
|
backupStaticAttributes="false"
|
||||||
colors="false"
|
colors="true"
|
||||||
convertErrorsToExceptions="true"
|
convertErrorsToExceptions="true"
|
||||||
convertNoticesToExceptions="true"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resque_Event tests.
|
* Resque_Event tests.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resque_Job_Status tests.
|
* Resque_Job_Status tests.
|
||||||
*
|
*
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resque_Job tests.
|
* Resque_Job tests.
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resque_Stat tests.
|
* Resque_Stat tests.
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resque_Worker tests.
|
* Resque_Worker tests.
|
||||||
*
|
*
|
||||||
|
@ -6,22 +6,13 @@
|
|||||||
* @author Chris Boulton <chris@bigcommerce.com>
|
* @author Chris Boulton <chris@bigcommerce.com>
|
||||||
* @license http://www.opensource.org/licenses/mit-license.php
|
* @license http://www.opensource.org/licenses/mit-license.php
|
||||||
*/
|
*/
|
||||||
define('CWD', dirname(__FILE__));
|
|
||||||
define('RESQUE_LIB', CWD . '/../../../lib/');
|
|
||||||
|
|
||||||
define('TEST_MISC', realpath(CWD . '/../../misc/'));
|
$loader = require __DIR__ . '/../vendor/autoload.php';
|
||||||
|
$loader->add('Resque_Tests', __DIR__);
|
||||||
|
|
||||||
|
define('TEST_MISC', realpath(__DIR__ . '/misc/'));
|
||||||
define('REDIS_CONF', TEST_MISC . '/redis.conf');
|
define('REDIS_CONF', TEST_MISC . '/redis.conf');
|
||||||
|
|
||||||
// Change to the directory this file lives in. This is important, due to
|
|
||||||
// how we'll be running redis.
|
|
||||||
|
|
||||||
require_once CWD . '/TestCase.php';
|
|
||||||
|
|
||||||
// Include Resque
|
|
||||||
require_once RESQUE_LIB . 'Resque.php';
|
|
||||||
require_once RESQUE_LIB . 'Resque/Worker.php';
|
|
||||||
require_once RESQUE_LIB . 'Resque/Redis.php';
|
|
||||||
|
|
||||||
// Attempt to start our own redis instance for tesitng.
|
// Attempt to start our own redis instance for tesitng.
|
||||||
exec('which redis-server', $output, $returnVar);
|
exec('which redis-server', $output, $returnVar);
|
||||||
if($returnVar != 0) {
|
if($returnVar != 0) {
|
Loading…
Reference in New Issue
Block a user