/** * Asserts the stream is readable * * @throws Magento_Filesystem_Exception */ protected function _assertReadable() { $this->_assertOpened(); if (false === $this->_mode->isReadAllowed()) { throw new Magento_Filesystem_Exception('The stream does not allow read.'); } }
/** * @dataProvider rModesDataProvider * @param string $mode */ public function testAllowRead($mode) { $streamMode = new Magento_Filesystem_Stream_Mode($mode); $this->assertTrue($streamMode->isReadAllowed()); }