9 use \Magento\Framework\Filesystem\DriverPool;
19 $default = $object->getDriver(
'');
20 $this->assertInstanceOf(\
Magento\Framework\
Filesystem\Driver\File::class, $default);
21 $this->assertSame($default, $object->getDriver(
''));
26 $customOne = $this->getMockForAbstractClass(\
Magento\Framework\
Filesystem\DriverInterface::class);
27 $customTwo = get_class($this->getMockForAbstractClass(\
Magento\Framework\
Filesystem\DriverInterface::class));
28 $object =
new DriverPool([
'customOne' => $customOne,
'customTwo' => $customTwo]);
29 $this->assertSame($customOne, $object->getDriver(
'customOne'));
30 $this->assertInstanceOf(\
Magento\Framework\
Filesystem\DriverInterface::class, $object->getDriver(
'customOne'));
31 $this->assertEquals($customTwo, get_class($object->getDriver(
'customTwo')));
32 $this->assertInstanceOf(\
Magento\Framework\
Filesystem\DriverInterface::class, $object->getDriver(
'customTwo'));
testCustomDriverException()