Completed
Push — master ( 2d6ec7...4d1653 )
by Jared
03:06
created

JCRequestTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 19
c 0
b 0
f 0
wmc 2
lcom 1
cbo 3
rs 10
ccs 8
cts 8
cp 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A testGet() 0 6 1
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * User: jaredchu
6
 * Date: 31/05/2017
7
 * Time: 10:14
8
 */
9
10
use JC\JCRequest;
11
12
class JCRequestTest extends PHPUnit_Framework_TestCase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
13
{
14
    /**
15
     * @var string
16
     */
17
    private $url;
18
19 1
    public function setUp()
20
    {
21 1
        $this->url = 'http://google.com';
22 1
    }
23
24 1
    public function testGet()
25
    {
26 1
        $response = JCRequest::get($this->url);
27 1
        $this->assertEquals(200, $response->status());
28 1
        $this->assertNotEmpty($response->body());
29
    }
30
}