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

UtilsTest::testToArrayIfArray()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
}