Completed
Push — master ( 0768ef...ea365c )
by Luca
03:38
created

UtilsTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 12
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testToArray() 0 4 1
A testToArrayIfArray() 0 4 1
1
<?php
2
/**
3
 * OpenFireRestAPI is based entirely on official documentation of the REST API
4
 * Plugin and you can extend it by following the directives of the documentation
5
 *
6
 * For the full copyright and license information, please read the LICENSE
7
 * file that was distributed with this source code. For the full list of
8
 * contributors, visit https://github.com/gnello/PHPOpenFireRestAPI/contributors
9
 *
10
 * @author Luca Agnello <[email protected]>
11
 * @link https://www.igniterealtime.org/projects/openfire/plugins/restapi/readme.html
12
 */
13
14
namespace Gnello\OpenFireRestAPI;
15
16
use Gnello\OpenFireRestAPI\Utils\Utils;
17
18
/**
19
 * Class UtilsTest
20
 * @package Gnello\OpenFireRestAPI
21
 */
22
class UtilsTest extends \PHPUnit_Framework_TestCase
23
{
24
    public function testToArray()
25
    {
26
        $this->assertEquals(array('ciao'), Utils::toArray('ciao'));
27
    }
28
29
    public function testToArrayIfArray()
30
    {
31
        $this->assertEquals(array('ciao'), Utils::toArray(array('ciao')));
32
    }
33
}