Passed
Push — develop ( 3c5942...636dd4 )
by Nikolay
04:57
created

DateTimeTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
dl 0
loc 19
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testPhpTimeZoneConfigure() 0 2 1
A testTimezoneConfigure() 0 8 1
A testSetDate() 0 2 1
1
<?php
2
/**
3
 * Copyright (C) MIKO LLC - All Rights Reserved
4
 * Unauthorized copying of this file, via any medium is strictly prohibited
5
 * Proprietary and confidential
6
 * Written by Nikolay Beketov, 6 2020
7
 *
8
 */
9
10
namespace MikoPBX\Tests\Core\System;
11
12
use MikoPBX\Core\System\DateTime;
13
use MikoPBX\Core\System\MikoPBXConfig;
14
use MikoPBX\Tests\Unit\AbstractUnitTest;
15
16
class DateTimeTest extends AbstractUnitTest
17
{
18
19
    public function testSetDate()
20
    {
21
    }
22
23
    public function testPhpTimeZoneConfigure()
24
    {
25
    }
26
27
    public function testTimezoneConfigure()
28
    {
29
        $mikoPBXConfig = new MikoPBXConfig();
30
        $timezone      = $mikoPBXConfig->getTimeZone();
31
        DateTime::phpTimeZoneConfigure();
32
        $etcPhpIniPath = '/etc/php.ini';
33
        $contents = file_get_contents($etcPhpIniPath);
34
        $this->assertStringContainsStringIgnoringCase($timezone, $contents);
35
    }
36
}
37