Initial commit, docs and tests forthcoming.

This commit is contained in:
2014-08-08 15:06:11 -05:00
parent d3653a12fc
commit 43fa2fc744
6 changed files with 423 additions and 0 deletions

View 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);
}
}