/**
  * @test
  *
  * Test unauthenticated GET
  */
 public function shouldGetPublicUserInfo()
 {
     $this->checkEnvVars();
     $client = new \phpSmug\Client(getenv('APIKEY'), ['AppName' => 'phpSmug Unit Testing']);
     $response = $client->get('user/colinseymour');
     $this->assertTrue(is_object($response));
     $this->assertEquals('Public', $response->User->ResponseLevel);
     $this->assertEquals('colinseymour', $response->User->NickName);
 }
Exemple #2
0
 /**
  * @test
  * @expectedException phpSmug\Exception\InvalidArgumentException
  * @expectedExceptionMessage All methods need an argument.
  */
 public function shouldThrowInvalidArgumentExceptionIfCallMethodWithoutDestination()
 {
     $client = new Client($this->APIKey);
     $client->get();
 }