Skip to content

Commit 47940a7

Browse files
author
Eugene Leonovich
committed
Tweak TaskTest
1 parent f3fa22c commit 47940a7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/Unit/TaskTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@
1616

1717
class TaskTest extends \PHPUnit_Framework_TestCase
1818
{
19-
static $isserMap = [
20-
States::READY => 'isReady',
21-
States::TAKEN => 'isTaken',
22-
States::DONE => 'isDone',
23-
States::BURIED => 'isBuried',
24-
States::DELAYED => 'isDelayed',
25-
];
26-
2719
/**
2820
* @dataProvider provideTuples
2921
*/
@@ -55,11 +47,19 @@ public function provideTuples()
5547
*/
5648
public function testIsser($state)
5749
{
50+
static $map = [
51+
States::READY => 'isReady',
52+
States::TAKEN => 'isTaken',
53+
States::DONE => 'isDone',
54+
States::BURIED => 'isBuried',
55+
States::DELAYED => 'isDelayed',
56+
];
57+
5858
$task = Task::createFromTuple([0, $state, null]);
5959

60-
$this->assertTrue($task->{self::$isserMap[$state]}());
60+
$this->assertTrue($task->{$map[$state]}());
6161

62-
$issers = self::$isserMap;
62+
$issers = $map;
6363
unset($issers[$state]);
6464

6565
foreach ($issers as $isser) {

0 commit comments

Comments
 (0)