| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | public function testSetCredentials() |
||
| 52 | { |
||
| 53 | $this->SugarAPI->setCredentials(array('username' => 'admin')); |
||
| 54 | $this->assertEquals(array( |
||
| 55 | 'username' => 'admin', |
||
| 56 | 'password' => '', |
||
| 57 | 'client_id' => 'sugar', |
||
| 58 | 'client_secret' => '', |
||
| 59 | 'platform' => 'api' |
||
| 60 | ),$this->SugarAPI->getCredentials()); |
||
| 61 | $this->SugarAPI->setCredentials(array('password' => 'asdf')); |
||
| 62 | $this->assertEquals($this->credentials,$this->SugarAPI->getCredentials()); |
||
| 63 | $this->SugarAPI->setCredentials(array()); |
||
| 64 | $this->assertEquals($this->credentials,$this->SugarAPI->getCredentials()); |
||
| 65 | $this->SugarAPI->setCredentials($this->credentials); |
||
| 66 | $this->assertEquals($this->credentials,$this->SugarAPI->getCredentials()); |
||
| 67 | $this->SugarAPI->setCredentials(array('foo' => 'bar' )); |
||
| 68 | $this->assertEquals($this->credentials,$this->SugarAPI->getCredentials()); |
||
| 69 | } |
||
| 70 | |||
| 72 |