Commit 3bda71d1 authored by alexpott's avatar alexpott

Issue #2770339 by claudiu.cristea: LocalReadOnlyStream must declare itself LOCAL

parent c7cc44ea
......@@ -19,7 +19,7 @@ abstract class LocalReadOnlyStream extends LocalStream {
* {@inheritdoc}
*/
public static function getType() {
return StreamWrapperInterface::READ_VISIBLE;
return StreamWrapperInterface::READ_VISIBLE | StreamWrapperInterface::LOCAL;
}
/**
......
......@@ -33,6 +33,8 @@ function testReadOnlyBehavior() {
$type = DummyReadOnlyStreamWrapper::getType();
// Checks that the stream wrapper type is not declared as writable.
$this->assertSame(0, $type & StreamWrapperInterface::WRITE);
// Checks that the stream wrapper type is declared as local.
$this->assertSame(1, $type & StreamWrapperInterface::LOCAL);
// Generate a test file
$filename = $this->randomMachineName();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment