You've already forked ugly-queue
Initial commit, docs and tests forthcoming.
This commit is contained in:
48
tests/UglyQueue/UglyQueueTest.php
Normal file
48
tests/UglyQueue/UglyQueueTest.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class UglyQueueTest
|
||||
*/
|
||||
class UglyQueueTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers \DCarbone\UglyQueue::__construct
|
||||
* @uses \DCarbone\UglyQueue
|
||||
* @return \DCarbone\UglyQueue
|
||||
*/
|
||||
public function testCanConstructUglyQueueWithValidParameter()
|
||||
{
|
||||
$conf = array(
|
||||
'queue-base-dir' => dirname(__DIR__).'/misc/',
|
||||
);
|
||||
|
||||
$uglyQueue = new \DCarbone\UglyQueue($conf);
|
||||
|
||||
return $uglyQueue;
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \DCarbone\UglyQueue::__construct
|
||||
* @uses \DCarbone\UglyQueue
|
||||
* @expectedException \InvalidArgumentException
|
||||
*/
|
||||
public function testExceptionThrownWhenConstructingUglyQueueWithEmptyOrInvalidConf()
|
||||
{
|
||||
$conf = array();
|
||||
$uglyQueue = new \DCarbone\UglyQueue($conf);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \DCarbone\UglyQueue::__construct
|
||||
* @uses \DCarbone\UglyQueue
|
||||
* @expectedException \RuntimeException
|
||||
*/
|
||||
public function testExceptionThrownWhenConstructingUglyQueueWithInvalidQueueBaseDirPath()
|
||||
{
|
||||
$conf = array(
|
||||
'queue-base-dir' => 'sandwiches',
|
||||
);
|
||||
|
||||
$uglyQueue = new \DCarbone\UglyQueue($conf);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user