RandTest.php 616 B

1234567891011121314151617181920212223242526272829303132
  1. <?php declare(strict_types=1);
  2. use PHPUnit\Framework\TestCase;
  3. final class RandTest extends TestCase
  4. {
  5. public function testFloat(): void
  6. {
  7. $re = Dy\Rand::float(4);
  8. $this->assertEquals(true, is_float($re));
  9. }
  10. /**
  11. * @test
  12. */
  13. public function testNumeric(): void
  14. {
  15. $re = Dy\Rand::numeric(4);
  16. $this->assertEquals(true, is_numeric($re));
  17. }
  18. }
  19. // var_dump(Dy\Rand::float(4));
  20. // var_dump(Dy\Rand::alphanumeric(4));
  21. // var_dump(Dy\Rand::numeric(4));
  22. // var_dump(Dy\Crypt::md5('test'));
  23. // var_dump(md5('test'));
  24. // echo Dy\Shell::exec("exa", "");