Rename processQueueLogic() method to processQueueStrategy() [PREMIUM-4]
This commit is contained in:
@ -19,7 +19,7 @@ abstract class KeyCheckWorker extends SimpleWorker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function processQueueLogic(SendingQueue $queue) {
|
function processQueueStrategy(SendingQueue $queue) {
|
||||||
try {
|
try {
|
||||||
$result = $this->checkKey();
|
$result = $this->checkKey();
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
@ -82,7 +82,7 @@ abstract class SimpleWorker {
|
|||||||
// abort if execution limit is reached
|
// abort if execution limit is reached
|
||||||
CronHelper::enforceExecutionLimit($this->timer);
|
CronHelper::enforceExecutionLimit($this->timer);
|
||||||
|
|
||||||
if($this->processQueueLogic($queue)) {
|
if($this->processQueueStrategy($queue)) {
|
||||||
$this->complete($queue);
|
$this->complete($queue);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ abstract class SimpleWorker {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function processQueueLogic(SendingQueue $queue) {
|
function processQueueStrategy(SendingQueue $queue) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class KeyCheckWorkerTest extends MailPoetTest {
|
|||||||
|
|
||||||
function testItReturnsTrueOnSuccessfulKeyCheck() {
|
function testItReturnsTrueOnSuccessfulKeyCheck() {
|
||||||
$queue = $this->createRunningQueue();
|
$queue = $this->createRunningQueue();
|
||||||
$result = $this->worker->processQueueLogic($queue);
|
$result = $this->worker->processQueueStrategy($queue);
|
||||||
expect($result)->true();
|
expect($result)->true();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ class KeyCheckWorkerTest extends MailPoetTest {
|
|||||||
$this
|
$this
|
||||||
);
|
);
|
||||||
$queue = $this->createRunningQueue();
|
$queue = $this->createRunningQueue();
|
||||||
$result = $worker->processQueueLogic($queue);
|
$result = $worker->processQueueStrategy($queue);
|
||||||
expect($result)->false();
|
expect($result)->false();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ class KeyCheckWorkerTest extends MailPoetTest {
|
|||||||
$this
|
$this
|
||||||
);
|
);
|
||||||
$queue = $this->createRunningQueue();
|
$queue = $this->createRunningQueue();
|
||||||
$result = $worker->processQueueLogic($queue);
|
$result = $worker->processQueueStrategy($queue);
|
||||||
expect($result)->false();
|
expect($result)->false();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ class SimpleWorkerTest extends MailPoetTest {
|
|||||||
$worker = Stub::construct(
|
$worker = Stub::construct(
|
||||||
$this->worker,
|
$this->worker,
|
||||||
array(),
|
array(),
|
||||||
array('processQueueLogic' => false),
|
array('processQueueStrategy' => false),
|
||||||
$this
|
$this
|
||||||
);
|
);
|
||||||
$result = $worker->processQueue($queue);
|
$result = $worker->processQueue($queue);
|
||||||
|
Reference in New Issue
Block a user