public function reload(array $options = [])
{
return $this->policy = $this->connection->getPolicy($options + ['resource' => $this->resource]);
}
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]); }