IntStreamTest.php 606 B

12345678910111213141516171819202122232425262728
  1. <?php declare(strict_types=1);
  2. /**
  3. * This file is part of toolkit/stdlib.
  4. *
  5. * @author https://github.com/inhere
  6. * @link https://github.com/php-toolkit/stdlib
  7. * @license MIT
  8. */
  9. namespace Toolkit\StdlibTest\Util\Stream;
  10. use Toolkit\Stdlib\Util\Stream\IntStream;
  11. use Toolkit\StdlibTest\BaseLibTestCase;
  12. /**
  13. * class IntStreamTest
  14. *
  15. * @author inhere
  16. */
  17. class IntStreamTest extends BaseLibTestCase
  18. {
  19. public function testIntStream_mapToString(): void
  20. {
  21. $int = IntStream::of([23, 34]);
  22. $this->assertEquals(['23', '34'], $int->mapToString('strval')->toArray());
  23. }
  24. }