mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 00:11:53 +00:00
ensure false is returned when DontCreate is thrown
This commit is contained in:
parent
8007705221
commit
0c39e2ca7a
@ -106,9 +106,10 @@ class Resque_Tests_EventTest extends Resque_Tests_TestCase
|
|||||||
Resque_Event::listen('beforeEnqueue', array($this, $callback));
|
Resque_Event::listen('beforeEnqueue', array($this, $callback));
|
||||||
Resque_Event::listen('afterEnqueue', array($this, 'afterEnqueueEventCallback'));
|
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->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->assertNotContains('afterEnqueueEventCallback', $this->callbacksHit, 'afterEnqueue was still called, even though it should not have been');
|
||||||
|
$this->assertFalse($result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testAfterEnqueueEventCallbackFires()
|
public function testAfterEnqueueEventCallbackFires()
|
||||||
|
Loading…
Reference in New Issue
Block a user