// lease.
$this->cron->
run();
static::
assertEquals(2, \Drupal::
state()->
get('cron_queue_test_lease_time'
));
} /**
* Tests that non-queue exceptions thrown by workers are handled properly.
*
* @see \Drupal\cron_queue_test\Plugin\QueueWorker\CronQueueTestException
*/
public function testUncaughtExceptions() { $this->logger->
expects($this->
atLeast(2
)) ->
method('log'
) ->
withConsecutive( [ $this->
equalTo(RfcLogLevel::ERROR
),
$this->
equalTo('%type: @message in %function (line %line of %file).'
),
$this->
callback(function D
$args) { return $args['@message'
] === 'That is not supposed to happen.' &&
$args['exception'
] instanceof \Exception;
}),
],
[