VirtualEcsRamRoleCredential.php 718 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace AlibabaCloud\Client\Tests\Unit\Credentials\Ini;
  3. /**
  4. * Class VirtualEcsRamRoleCredential
  5. *
  6. * @codeCoverageIgnore
  7. *
  8. * @package AlibabaCloud\Client\Tests\Unit\Credentials\Ini
  9. */
  10. class VirtualEcsRamRoleCredential extends VirtualAccessKeyCredential
  11. {
  12. /**
  13. * @return string
  14. */
  15. public static function noRoleName()
  16. {
  17. $content = <<<EOT
  18. [phpunit]
  19. enable = true
  20. type = ecs_ram_role
  21. EOT;
  22. return (new static($content))->url();
  23. }
  24. /**
  25. * @return string
  26. */
  27. public static function client()
  28. {
  29. $content = <<<EOT
  30. [phpunit]
  31. enable = true
  32. type = ecs_ram_role
  33. role_name = role_name
  34. EOT;
  35. return (new static($content))->url();
  36. }
  37. }