예제 #1
0
 /**
  * Tests
  */
 public function test__construct()
 {
     $conn = new StubConnection('http://example.com', 'SECRET');
     $compute = $conn->Compute(NULL, 'DFW');
     $this->att = new publicVolumeAttachment(new \OpenCloud\Compute\Server($compute, 'XXX'), 'FOO');
     $this->assertEquals('FOO', $this->att->volumeId);
 }
예제 #2
0
 public function testImportCredentials()
 {
     $this->my->Authenticate();
     $arr = $this->my->ExportCredentials();
     $conn = new StubConnection(TEST_DOMAIN, array('username' => 'Foo', 'password' => 'Bar'));
     $conn->ImportCredentials($arr);
     $this->assertEquals($arr['token'], $conn->Token());
 }