Google\Cloud\Iam\Iam::reload PHP Method

reload() public method

Example: $policy = $iam->reload();
public reload ( array $options = [] ) : array
$options array Configuration Options
return array An array of policy data
    public function reload(array $options = [])
    {
        return $this->policy = $this->connection->getPolicy($options + ['resource' => $this->resource]);
    }

Usage Example

Ejemplo n.º 1
0
 public function testReload()
 {
     $policies = $this->policies();
     $this->connection->getPolicy(Argument::withEntry('foo', 'bar'))->willReturn($policies[0])->shouldBeCalledTimes(1);
     $iam = new Iam($this->connection->reveal(), self::RESOURCE);
     $iam->reload(['foo' => 'bar']);
     $this->assertEquals($iam->policy(), $policies[0]);
 }