Some more tests and such.

This commit is contained in:
2014-10-01 08:10:39 -05:00
parent 97dba637d9
commit d20106a021
4 changed files with 126 additions and 11 deletions

View File

@@ -84,12 +84,12 @@ class UglyQueueManager implements \SplObserver, \SplSubject
/**
* @param UglyQueue $uglyQueue
* @return \DCarbone\UglyQueueManager
* @throws \InvalidArgumentException
* @throws \RuntimeException
*/
public function addQueue(UglyQueue $uglyQueue)
{
if ($this->containsQueueWithName($uglyQueue->name))
throw new \InvalidArgumentException('Queue named "'.$uglyQueue->name.'" already exists in this manager.');
throw new \RuntimeException('Queue named "'.$uglyQueue->name.'" already exists in this manager.');
$this->queues[$uglyQueue->name] = $uglyQueue;