Php73Test.php 537 B

12345678910111213141516
  1. <?php
  2. use Laravel\SerializableClosure\Exceptions\PhpVersionNotSupportedException;
  3. use Laravel\SerializableClosure\SerializableClosure;
  4. test('serializable closure does not support PHP 7.3', function () {
  5. new SerializableClosure(function () {
  6. return 'foo';
  7. });
  8. })->throws(PhpVersionNotSupportedException::class);
  9. test('unsigned serializable closure does not support PHP 7.3', function () {
  10. SerializableClosure::unsigned(function () {
  11. return 'foo';
  12. });
  13. })->throws(PhpVersionNotSupportedException::class);