Google\Cloud\Tests\Iam\IamTest::testPolicy PHP Méthode

testPolicy() public méthode

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