AllProperty74Test.php 905 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * @CreateTime: 2019/12/7 下午10:59
  4. * @Author: huizhang <tuzisir@163.com>
  5. * @Copyright: copyright(2019) Easyswoole all rights reserved
  6. * @Description: 兼容php7.4约束类型单测
  7. */
  8. namespace EasySwoole\Spl\Test;
  9. use EasySwoole\Spl\Test\Bean\TestAllProperty;
  10. use EasySwoole\Spl\Test\Bean\TestAllProperty74;
  11. use PHPUnit\Framework\TestCase;
  12. class AllProperty74Test extends TestCase
  13. {
  14. function testGetAllProperty()
  15. {
  16. $allProperty = new TestAllProperty();
  17. $this->assertEquals(
  18. [
  19. 'a', 'b', 'aInit', 'bInit'
  20. ]
  21. , $allProperty->allProperty());
  22. }
  23. function testGetAllProperty74()
  24. {
  25. $allProperty74 = new TestAllProperty74();
  26. $this->assertEquals([
  27. 'a', 'b', 'aInit', 'bInit', 'typeA', 'typeB', 'typeInitA', 'typeInitB'
  28. ], $allProperty74->allProperty());
  29. }
  30. }