Test Setup Failed
Push — master ( 1b9e42...5af7b3 )
by Haridarshan
03:37
created

InstagramTest::setup()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace Haridarshan\Instagram\Test;
3
4
use Haridarshan\Instagram\Instagram;
5
6
class InstagramTest extends \PHPUnit_Framework_TestCase {
7
	protected $instagram;
8
	
9
	protected function setup() {
10
		$this->instagram = new Instagram(CLIENT_ID, CLIENT_SECRET, CALLBACK_URL);	
0 ignored issues
show
Unused Code introduced by
The call to Instagram::__construct() has too many arguments starting with CLIENT_SECRET.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
11
	}
12
	
13
	public function testBuildClient(){
14
		$this->assertObjectHasAttribute('client_id', $this->instagram);		
15
		$this->assertObjectHasAttribute('client_secret', $this->instagram);		
16
		$this->assertObjectHasAttribute('callback_url', $this->instagram);
17
	}
18
	
19
	
20
}
21