Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #32 from juriansluiman/feature/slm-queue-beanstalk…
Browse files Browse the repository at this point in the history
…d-use-exception

Add test to check for Beanstalkd exception
  • Loading branch information
bakura10 committed May 5, 2014
2 parents 4c7eeee + 7fe643d commit f543b99
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/SlmQueueBeanstalkd/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace SlmBeanstalkdQueue\Exception;
namespace SlmQueueBeanstalkd\Exception;

use SlmQueue\Exception\ExceptionInterface as BaseExceptionInterface;

Expand Down
12 changes: 12 additions & 0 deletions tests/SlmQueueBeanstalkdTest/Worker/BeanstalkdWorkerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,16 @@ public function testAssertJobIsBuriedIfAnyExceptionIsThrown()

$this->assertEquals('buried', $job->getContent());
}

public function testOnlyBeanstalkdQueuesAreAllowed()
{
$queue = $this->getMock('SlmQueue\Queue\QueueInterface');
$job = new Asset\SimpleJob();

try {
$this->worker->processJob($job, $queue);
} catch (\Exception $e) {
$this->assertInstanceOf('SlmQueueBeanstalkd\Exception\ExceptionInterface', $e);
}
}
}

0 comments on commit f543b99

Please sign in to comment.