Example #1
0
 /**
  * Tests getFederationToken method
  * 
  * @return void
  */
 public function testGetFederationToken()
 {
     $this->if($stsClient = $this->createStsClientMock())->and($client = new Base($stsClient))->and($stsClient->getMockController()->getFederationToken = null)->and($client = new Base($stsClient))->and($client->getFederationToken($name = uniqid()))->then->mock($stsClient)->call('getFederationToken')->withArguments(['Name' => $name, 'DurationSeconds' => 43200])->once();
     $this->if($stsClient = $this->createStsClientMock())->and($client = new Base($stsClient))->and($stsClient->getMockController()->getFederationToken = null)->and($client = new Base($stsClient))->and($client->getFederationToken($name = uniqid(), $policy = uniqid(), $durationSeconds = rand()))->then->mock($stsClient)->call('getFederationToken')->withArguments(['Name' => $name, 'Policy' => $policy, 'DurationSeconds' => $durationSeconds])->once();
 }