Autoload.test.php 857 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * @author Khoa Bui (khoaofgod) <khoaofgod@gmail.com> http://www.phpfastcache.com
  4. * @author Georges.L (Geolim4) <contact@geolim4.com>
  5. */
  6. use phpFastCache\Helper\TestHelper;
  7. chdir(__DIR__);
  8. require_once __DIR__ . '/../src/autoload.php';
  9. $testHelper = new TestHelper('Autoload');
  10. /**
  11. * Testing PhpFastCache autoload
  12. */
  13. if (!class_exists('phpFastCache\CacheManager')) {
  14. $testHelper->printFailText('Autoload failed to find the CacheManager');
  15. }else{
  16. $testHelper->printPassText('Autoload successfully found the CacheManager');
  17. }
  18. /**
  19. * Testing Psr autoload
  20. */
  21. if (!interface_exists('Psr\Cache\CacheItemInterface')) {
  22. $testHelper->printFailText('Autoload failed to find the Psr CacheItemInterface');
  23. }else{
  24. $testHelper->printPassText('Autoload successfully found the Psr CacheItemInterface');
  25. }
  26. $testHelper->terminateTest();