diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/php.ini | 2 | ||||
-rw-r--r-- | tests/units/Base.php | 2 | ||||
-rw-r--r-- | tests/units/TaskCreationTest.php | 2 | ||||
-rw-r--r-- | tests/units/TaskStatusTest.php | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/php.ini b/tests/php.ini new file mode 100644 index 00000000..7079a4e6 --- /dev/null +++ b/tests/php.ini @@ -0,0 +1,2 @@ +short_open_tag = On +date.timezone = UTC
\ No newline at end of file diff --git a/tests/units/Base.php b/tests/units/Base.php index d2190c32..1bbd62f8 100644 --- a/tests/units/Base.php +++ b/tests/units/Base.php @@ -9,8 +9,6 @@ use Symfony\Component\Stopwatch\Stopwatch; use SimpleLogger\Logger; use SimpleLogger\File; -date_default_timezone_set('UTC'); - class FakeHttpClient { private $url = ''; diff --git a/tests/units/TaskCreationTest.php b/tests/units/TaskCreationTest.php index 986f1eb1..b3f001c7 100644 --- a/tests/units/TaskCreationTest.php +++ b/tests/units/TaskCreationTest.php @@ -94,7 +94,7 @@ class TaskCreationTest extends Base $this->assertEquals('', $task['reference']); $this->assertEquals(time(), $task['date_creation'], 'Wrong timestamp', 1); - $this->assertEquals(time(), $task['date_modification'], 'Wrog timestamp', 1); + $this->assertEquals(time(), $task['date_modification'], 'Wrong timestamp', 1); $this->assertEquals(0, $task['date_due']); $this->assertEquals(0, $task['date_completed']); $this->assertEquals(0, $task['date_started']); diff --git a/tests/units/TaskStatusTest.php b/tests/units/TaskStatusTest.php index b62ae560..5c59698b 100644 --- a/tests/units/TaskStatusTest.php +++ b/tests/units/TaskStatusTest.php @@ -29,7 +29,7 @@ class TaskStatusTest extends Base $this->assertNotEmpty($task); $this->assertEquals(Task::STATUS_OPEN, $task['is_active']); $this->assertEquals(0, $task['date_completed']); - $this->assertEquals(time(), $task['date_modification']); + $this->assertEquals(time(), $task['date_modification'], '', 1); // We close the task @@ -54,7 +54,7 @@ class TaskStatusTest extends Base $this->assertNotEmpty($task); $this->assertEquals(Task::STATUS_OPEN, $task['is_active']); $this->assertEquals(0, $task['date_completed']); - $this->assertEquals(time(), $task['date_modification'], 1); + $this->assertEquals(time(), $task['date_modification'], '', 1); $called = $this->container['dispatcher']->getCalledListeners(); $this->assertArrayHasKey('task.close.TaskStatusTest::onTaskClose', $called); |