StringUtilsTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 2
Metric Value
c 2
b 0
f 2
dl 0
loc 21
wmc 1
lcom 0
cbo 2
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testExtractUrls() 0 14 1
1
<?php
2
3
namespace OAuth\Unit\UserData\Utils;
4
5
use OAuth\UserData\Utils\StringUtils;
6
7
class StringUtilsTest extends \PHPUnit_Framework_TestCase
8
{
9
10
    /**
11
     * @covers OAuth\UserData\Utils\StringUtils::extractUrls
12
     */
13
    public function testExtractUrls()
14
    {
15
        $string = "Lorem ipsum http://example.com dolor sit http://example2.com amet http://example3.com";
16
17
        $expected = array(
18
            'http://example.com',
19
            'http://example2.com',
20
            'http://example3.com'
21
        );
22
23
        $actual = StringUtils::extractUrls($string);
24
25
        $this->assertEquals($expected, $actual);
26
    }
27
}
28