assertEquals($roleName, $credential->getRoleName()); $this->assertEquals($expected, (string)$credential); } /** * @throws ClientException */ public function testRoleNameEmpty() { $this->expectException(ClientException::class); $this->expectExceptionMessage('Role Name cannot be empty'); // Setup $roleName = ''; // Test new EcsRamRoleCredential($roleName); } /** * @throws ClientException */ public function testRoleNameFormat() { $this->expectException(ClientException::class); $this->expectExceptionMessage('Role Name must be a string'); // Setup $roleName = null; // Test new EcsRamRoleCredential($roleName); } }