InternalUtilsTest.php 544 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace GuzzleHttp\Test;
  3. use GuzzleHttp\Psr7;
  4. use GuzzleHttp\Utils;
  5. use PHPUnit\Framework\TestCase;
  6. class InternalUtilsTest extends TestCase
  7. {
  8. public function testCurrentTime()
  9. {
  10. self::assertGreaterThan(0, Utils::currentTime());
  11. }
  12. /**
  13. * @requires extension idn
  14. */
  15. public function testIdnConvert()
  16. {
  17. $uri = Psr7\Utils::uriFor('https://яндекс.рф/images');
  18. $uri = Utils::idnUriConvert($uri);
  19. self::assertSame('xn--d1acpjx3f.xn--p1ai', $uri->getHost());
  20. }
  21. }