InspectionTests.php 532 B

12345678910111213141516
  1. <?php
  2. use League\Flysystem\Cached\CachedAdapter;
  3. use PHPUnit\Framework\TestCase;
  4. class InspectionTests extends TestCase {
  5. public function testGetAdapter()
  6. {
  7. $adapter = Mockery::mock('League\Flysystem\AdapterInterface');
  8. $cache = Mockery::mock('League\Flysystem\Cached\CacheInterface');
  9. $cache->shouldReceive('load')->once();
  10. $cached_adapter = new CachedAdapter($adapter, $cache);
  11. $this->assertInstanceOf('League\Flysystem\AdapterInterface', $cached_adapter->getAdapter());
  12. }
  13. }