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

Commit

Permalink
Catch the exception and test its type directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurian Sluiman committed Apr 21, 2014
1 parent bb3f67a commit 7fe643d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/SlmQueueBeanstalkdTest/Worker/BeanstalkdWorkerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ public function testOnlyBeanstalkdQueuesAreAllowed()
$queue = $this->getMock('SlmQueue\Queue\QueueInterface');
$job = new Asset\SimpleJob();

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

0 comments on commit 7fe643d

Please sign in to comment.