From 0c39e2ca7ae5cbc2f6b40c2d90e7ffcf3ab23abf Mon Sep 17 00:00:00 2001 From: Chris Boulton Date: Mon, 2 Feb 2015 12:30:40 -0800 Subject: [PATCH] ensure false is returned when DontCreate is thrown --- test/Resque/Tests/EventTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/Resque/Tests/EventTest.php b/test/Resque/Tests/EventTest.php index 44f31b1..1147c99 100644 --- a/test/Resque/Tests/EventTest.php +++ b/test/Resque/Tests/EventTest.php @@ -106,9 +106,10 @@ class Resque_Tests_EventTest extends Resque_Tests_TestCase Resque_Event::listen('beforeEnqueue', array($this, $callback)); Resque_Event::listen('afterEnqueue', array($this, 'afterEnqueueEventCallback')); - Resque::enqueue('test_job', 'TestClass'); + $result = Resque::enqueue('test_job', 'TestClass'); $this->assertContains($callback, $this->callbacksHit, $callback . ' callback was not called'); $this->assertNotContains('afterEnqueueEventCallback', $this->callbacksHit, 'afterEnqueue was still called, even though it should not have been'); + $this->assertFalse($result); } public function testAfterEnqueueEventCallbackFires()