Skip to content

Commit

Permalink
Convert setExpectedExceptionRegExp calls to setExpectedException
Browse files Browse the repository at this point in the history
Also known as patch A
  • Loading branch information
kenneth-hendricks committed Mar 1, 2017
1 parent 5cf12e0 commit 175bd1f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/filestorage/tests/file_system_filedir_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ public function test_readonly_filesystem_filedir() {
->chown(\org\bovigo\vfs\vfsStream::OWNER_USER_2);

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

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

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

new file_system_filedir();
}
Expand Down Expand Up @@ -693,8 +693,8 @@ public function test_add_file_from_path_file_unavailable() {
// Setup the filedir.
$vfileroot = $this->setup_vfile_root();

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

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

0 comments on commit 175bd1f

Please sign in to comment.