public function testSetPrimaryAccount()
 {
     $this->accounts[] = $this->client->getPrimaryAccount();
     $account = $this->createAccount();
     $this->client->setPrimaryAccount($account);
     $this->assertTrue($account->isPrimary());
 }
예제 #2
0
 public function testSetPrimaryAccount()
 {
     $account = Account::reference('ACCOUNT_ID');
     $response = $this->getMock(ResponseInterface::class);
     $this->http->expects($this->once())->method('post')->with('/v2/accounts/ACCOUNT_ID/primary', ['foo' => 'bar'])->willReturn($response);
     $this->mapper->expects($this->once())->method('toAccount')->with($response, $account);
     $this->client->setPrimaryAccount($account, ['foo' => 'bar']);
 }