Example: use Google\Cloud\Iam\PolicyBuilder; $builder = new PolicyBuilder(); $builder->addBinding('roles/admin', [ 'user:admin@domain.com' ]); $result = $builder->result();
コード例 #1
0
 public function testConstructWithExistingPolicy()
 {
     $policy = ['bindings' => [['role' => 'test', 'members' => ['user:test@test.com']]], 'etag' => 'foo', 'version' => 2];
     $builder = new PolicyBuilder($policy);
     $result = $builder->result();
     $this->assertEquals($policy, $result);
 }