Skip to content

Commit

Permalink
MDL-29708 Fixed extra slashes in $string['storedfilenotcreated'].
Browse files Browse the repository at this point in the history
  • Loading branch information
scara authored and Matteo Scaramuccia committed Jun 7, 2014
1 parent afce57c commit 874db75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lang/en/error.php
Expand Up @@ -489,7 +489,7 @@
$string['storedfilecannotcreatefile'] = 'Can not create local file pool file, please verify permissions in dataroot and available disk space.';
$string['storedfilecannotcreatefiledirs'] = 'Can not create local file pool directories, please verify permissions in dataroot.';
$string['storedfilecannotread'] = 'Can not read file, either file does not exist or there are permission problems';
$string['storedfilenotcreated'] = 'Can not create file "{$a->contextid}/{$a->component}/{$a->filearea}/{$a->itemid}/{$a->filepath}/{$a->filename}"';
$string['storedfilenotcreated'] = 'Can not create file "{$a->contextid}/{$a->component}/{$a->filearea}/{$a->itemid}{$a->filepath}{$a->filename}"';
$string['storedfileproblem'] = 'Unknown exception related to local files ({$a})';
$string['tagdisabled'] = 'Tags are disabled!';
$string['tagnotfound'] = 'The specified tag was not found in the database';
Expand Down
7 changes: 4 additions & 3 deletions lib/filestorage/tests/file_storage_test.php
Expand Up @@ -300,7 +300,8 @@ public function test_file_renaming() {
$this->assertEquals($contenthash, $file->get_contenthash());

// Try break it.
$this->setExpectedException('file_exception');
$this->setExpectedException('file_exception',
'Can not create file "1/core/unittest/0/test/newtest.txt" (file exists, cannot rename)');
// This shall throw exception.
$originalfile->rename($newpath, $newname);
}
Expand Down Expand Up @@ -1146,7 +1147,7 @@ public function test_create_file_from_storedfile_duplicate() {
$this->assertInstanceOf('stored_file', $file1);

// Creating a file validating unique constraint.
$this->setExpectedException('stored_file_creation_exception');
$this->setExpectedException('stored_file_creation_exception', 'Can not create file "1/core/phpunit/0/testfile.txt"');
$fs->create_file_from_storedfile($filerecord, $file1->get_id());
}

Expand Down Expand Up @@ -1426,7 +1427,7 @@ public function test_create_file_from_pathname_duplicate_file() {
$this->assertInstanceOf('stored_file', $file1);

// Creating a file validating unique constraint.
$this->setExpectedException('stored_file_creation_exception');
$this->setExpectedException('stored_file_creation_exception', 'Can not create file "1/core/phpunit/0/testfile.txt"');
$file2 = $fs->create_file_from_pathname($filerecord, $path);
}

Expand Down

0 comments on commit 874db75

Please sign in to comment.