Skip to content

Commit 28f565e

Browse files
committed
Fix tests.
1 parent 5d7b780 commit 28f565e

File tree

6 files changed

+26
-7
lines changed

6 files changed

+26
-7
lines changed

src/Generator/Task/QueuedJobTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class QueuedJobTask implements TaskInterface {
99

1010
/**
11-
* @var array
11+
* @var string[]
1212
*/
1313
protected $aliases = [
1414
'\Queue\Model\Table\QueuedJobsTable::createJob(0)',

src/Model/Table/QueuedJobsTable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ public function getFullStats($jobType = null) {
353353
* from the specified group (or any if null).
354354
*
355355
* @param array $capabilities Available QueueWorkerTasks.
356-
* @param array $groups Request a job from these groups (or exclude certain groups), or any otherwise.
357-
* @param array $types Request a job from these types (or exclude certain types), or any otherwise.
356+
* @param string[] $groups Request a job from these groups (or exclude certain groups), or any otherwise.
357+
* @param string[] $types Request a job from these types (or exclude certain types), or any otherwise.
358358
* @return \Queue\Model\Entity\QueuedJob|null
359359
*/
360360
public function requestJob(array $capabilities, array $groups = [], array $types = []) {
@@ -892,7 +892,7 @@ protected function _getDriverName() {
892892
/**
893893
* @param array $conditions
894894
* @param string $key
895-
* @param array $values
895+
* @param string[] $values
896896
* @return array
897897
*/
898898
protected function addFilter(array $conditions, $key, array $values) {

src/Shell/QueueShell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ protected function _time($providedTime = null) {
764764

765765
/**
766766
* @param string|null $param
767-
* @return array
767+
* @return string[]
768768
*/
769769
protected function _stringToArray($param) {
770770
if (!$param) {

src/Shell/Task/QueueMonitorExampleTask.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ protected function doMonitoring() {
7979
}
8080

8181
/**
82-
* @return array
82+
* @return string[]
8383
*/
8484
protected function getSystemMemInfo() {
8585
$data = explode("\n", file_get_contents('/proc/meminfo'));

tests/TestCase/View/Helper/QueueProgressHelperTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use Cake\View\View;
99
use Queue\Model\Entity\QueuedJob;
1010
use Queue\View\Helper\QueueProgressHelper;
11+
use Tools\Utility\Number;
1112

1213
class QueueProgressHelperTest extends TestCase {
1314

@@ -23,15 +24,33 @@ class QueueProgressHelperTest extends TestCase {
2324
*/
2425
protected $QueueProgressHelper;
2526

27+
/**
28+
* @var string
29+
*/
30+
protected $locale;
31+
2632
/**
2733
* @return void
2834
*/
2935
public function setUp() {
3036
parent::setUp();
3137

38+
$this->locale = ini_get('intl.default_locale');
39+
ini_set('intl.default_locale', 'en-US');
40+
Number::config('en_EN');
41+
3242
$this->QueueProgressHelper = new QueueProgressHelper(new View(null));
3343
}
3444

45+
/**
46+
* @return void
47+
*/
48+
public function tearDown() {
49+
parent::tearDown();
50+
51+
ini_set('intl.default_locale', $this->locale);
52+
}
53+
3554
/**
3655
* @return void
3756
*/

tests/test_app/src/Shell/TestQueueShell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class TestQueueShell extends QueueShell {
88

99
/**
10-
* @var array
10+
* @var string[]
1111
*/
1212
public $out = [];
1313

0 commit comments

Comments
 (0)