public function testPopulate() { $conoha = new ConoHa(); $ident = $conoha->getIdentityService(TEST_IDENTITY_ENDPOINT); $secret = __get_test_secret(); $ident->tokens($secret); }
public static function setUpBeforeClass() { if (API_TEST) { $access = __get_test_access(); $c = new ConoHa(); $c->setAccess($access); self::$service = $c->getAccountService(); } }
public static function setUpBeforeClass() { $conoha = new ConoHa(); $conoha->setAccess(__get_test_access()); $s = $conoha->getAccountService(); $ns = $s->notifications(); if (count($ns) == 0) { $this->markTestSkipped('告知(Notification)が0件です'); } self::$notification = $ns[0]; }
function __get_test_access() { static $access; if (!$access) { $secret = new Secret(); $secret->setUsername(TEST_API_USERNAME); $secret->setPassword(TEST_API_PASSWORD); $secret->setTenantName(TEST_API_TENANT_NAME); $secret->setTenantId(TEST_API_TENANT_ID); $secret->setAuthUrl(TEST_IDENTITY_ENDPOINT); $c = new ConoHa(); $access = $c->auth($secret); } return $access; }