| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function testIsAuthorised() |
||
| 34 | { |
||
| 35 | /** |
||
| 36 | * Should fail if an access token is not set. |
||
| 37 | */ |
||
| 38 | $twitterAccount = new TwitterAccount(); |
||
| 39 | |||
| 40 | $this->assertFalse($twitterAccount->isAuthorised()); |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Should pass if an access token is set. |
||
| 44 | */ |
||
| 45 | $twitterAccount = new TwitterAccount([ |
||
| 46 | 'AccessToken' => serialize(['token' => 'abc', 'secret' => '123']), |
||
| 47 | ]); |
||
| 48 | |||
| 49 | $this->assertTrue($twitterAccount->isAuthorised()); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.