Keine Beschreibung

BaseTest.php 706B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Google\Auth\tests;
  3. use GuzzleHttp\ClientInterface;
  4. use PHPUnit\Framework\TestCase;
  5. abstract class BaseTest extends TestCase
  6. {
  7. public function onlyGuzzle6()
  8. {
  9. $version = ClientInterface::VERSION;
  10. if ('6' !== $version[0]) {
  11. $this->markTestSkipped('Guzzle 6 only');
  12. }
  13. }
  14. public function onlyGuzzle5()
  15. {
  16. $version = ClientInterface::VERSION;
  17. if ('5' !== $version[0]) {
  18. $this->markTestSkipped('Guzzle 5 only');
  19. }
  20. }
  21. /**
  22. * @see Google\Auth\$this->getValidKeyName
  23. */
  24. public function getValidKeyName($key)
  25. {
  26. return preg_replace('|[^a-zA-Z0-9_\.! ]|', '', $key);
  27. }
  28. }