mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 00:11:53 +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:
|
||||
- 5.3
|
||||
- 5.4
|
||||
before_script:
|
||||
- composer install --dev
|
@ -1,7 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit backupGlobals="false"
|
||||
bootstrap="test/bootstrap.php"
|
||||
backupStaticAttributes="false"
|
||||
colors="false"
|
||||
colors="true"
|
||||
convertErrorsToExceptions="true"
|
||||
convertNoticesToExceptions="true"
|
||||
convertWarningsToExceptions="true"
|
||||
|
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
||||
|
||||
/**
|
||||
* Resque_Event tests.
|
||||
*
|
||||
|
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
||||
|
||||
/**
|
||||
* Resque_Job_Status tests.
|
||||
*
|
||||
|
@ -1,5 +1,4 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
||||
|
||||
/**
|
||||
* Resque_Job tests.
|
||||
|
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
||||
|
||||
/**
|
||||
* Resque_Stat tests.
|
||||
*
|
||||
|
@ -1,6 +1,4 @@
|
||||
<?php
|
||||
require_once dirname(__FILE__) . '/bootstrap.php';
|
||||
|
||||
/**
|
||||
* Resque_Worker tests.
|
||||
*
|
||||
|
@ -6,22 +6,13 @@
|
||||
* @author Chris Boulton <chris@bigcommerce.com>
|
||||
* @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');
|
||||
|
||||
// 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.
|
||||
exec('which redis-server', $output, $returnVar);
|
||||
if($returnVar != 0) {
|
||||
@ -61,7 +52,7 @@ function killRedis($pid)
|
||||
if (file_exists($pidFile)) {
|
||||
$pid = trim(file_get_contents($pidFile));
|
||||
posix_kill((int) $pid, 9);
|
||||
|
||||
|
||||
if(is_file($pidFile)) {
|
||||
unlink($pidFile);
|
||||
}
|
Loading…
Reference in New Issue
Block a user