mirror of
https://github.com/shufflingpixels/php-io.git
synced 2026-08-15 19:58:14 +02:00
Rename FileMode::writeable to writable
This commit is contained in:
parent
ad457610d7
commit
2ea813589a
3 changed files with 5 additions and 5 deletions
|
|
@ -29,6 +29,6 @@ class File extends Resource
|
|||
throw new IOException("Unable to open file");
|
||||
}
|
||||
|
||||
return new self($fd, $mode->seekable(), $mode->readable(), $mode->writeable());
|
||||
return new self($fd, $mode->seekable(), $mode->readable(), $mode->writable());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ enum FileMode : string
|
|||
return $this === self::READ || $this === self::RW;
|
||||
}
|
||||
|
||||
public function writeable(): bool
|
||||
public function writable(): bool
|
||||
{
|
||||
return $this === self::WRITE || $this === self::RW;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ it('defines expected fopen mode values', function () {
|
|||
|
||||
it('reports read and write capabilities for each mode', function () {
|
||||
expect(FileMode::READ->readable())->toBeTrue()
|
||||
->and(FileMode::READ->writeable())->toBeFalse()
|
||||
->and(FileMode::READ->writable())->toBeFalse()
|
||||
->and(FileMode::WRITE->readable())->toBeFalse()
|
||||
->and(FileMode::WRITE->writeable())->toBeTrue()
|
||||
->and(FileMode::WRITE->writable())->toBeTrue()
|
||||
->and(FileMode::RW->readable())->toBeTrue()
|
||||
->and(FileMode::RW->writeable())->toBeTrue()
|
||||
->and(FileMode::RW->writable())->toBeTrue()
|
||||
->and(FileMode::READ->seekable())->toBeTrue();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue