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

JCRequestTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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