Skip to content

Commit 175bd1f

Browse files
Convert setExpectedExceptionRegExp calls to setExpectedException
Also known as patch A
1 parent 5cf12e0 commit 175bd1f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/filestorage/tests/file_system_filedir_test.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ public function test_readonly_filesystem_filedir() {
149149
->chown(\org\bovigo\vfs\vfsStream::OWNER_USER_2);
150150

151151
// This should generate an exception.
152-
$this->setExpectedExceptionRegexp('file_exception',
153-
'/Can not create local file pool directories, please verify permissions in dataroot./');
152+
$this->setExpectedException('file_exception',
153+
'Can not create local file pool directories, please verify permissions in dataroot.');
154154

155155
new file_system_filedir();
156156
}
@@ -170,8 +170,8 @@ public function test_readonly_filesystem_trashdir() {
170170
->chown(\org\bovigo\vfs\vfsStream::OWNER_USER_2);
171171

172172
// This should generate an exception.
173-
$this->setExpectedExceptionRegexp('file_exception',
174-
'/Can not create local file pool directories, please verify permissions in dataroot./');
173+
$this->setExpectedException('file_exception',
174+
'Can not create local file pool directories, please verify permissions in dataroot.');
175175

176176
new file_system_filedir();
177177
}
@@ -693,8 +693,8 @@ public function test_add_file_from_path_file_unavailable() {
693693
// Setup the filedir.
694694
$vfileroot = $this->setup_vfile_root();
695695

696-
$this->setExpectedExceptionRegexp('file_exception',
697-
'/Cannot read file\. Either the file does not exist or there is a permission problem\./');
696+
$this->setExpectedException('file_exception',
697+
'Cannot read file. Either the file does not exist or there is a permission problem.');
698698

699699
$fs = new file_system_filedir();
700700
$fs->add_file_from_path(\org\bovigo\vfs\vfsStream::url('filedir/file'));

0 commit comments

Comments
 (0)