public function testGetAdapterWithConfig() { // EC2 adapter $Ec2Adapter = CloudFactory::getAdapter(new Config(Ec2OfflineTest::getConfigArray(), true)); $this->assertEquals('Zend\\Cloud\\Infrastructure\\Adapter\\Ec2', get_class($Ec2Adapter)); // Rackspace adapter $rackspaceAdapter = CloudFactory::getAdapter(new Config(RackspaceOfflineTest::getConfigArray(), true)); $this->assertEquals('Zend\\Cloud\\Infrastructure\\Adapter\\Rackspace', get_class($rackspaceAdapter)); }
public function testStopInstance() { $this->markTestSkipped('Test stop instance skipped'); } /** * Test start an instance */ public function testStartInstance() { $this->markTestSkipped('Test start instance skipped'); } /** * Test reboot and instance */ public function testRebootInstance() { $this->assertTrue($this->infrastructure->rebootInstance(self::SERVER_ID)); $this->assertTrue($this->infrastructure->isSuccessful()); } /** * Test destroy instance */ public function testDestroyInstance() { $this->assertTrue($this->infrastructure->destroyInstance(self::SERVER_ID)); $this->assertTrue($this->infrastructure->isSuccessful()); } } if (PHPUnit_MAIN_METHOD == 'ZendTest\\Cloud\\Infrastructure\\Adapter\\RackspaceOfflineTest::main') { RackspaceOfflineTest::main(); }