diff options
Diffstat (limited to 'tests/lib/LegacyHelperTest.php')
-rw-r--r-- | tests/lib/LegacyHelperTest.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/lib/LegacyHelperTest.php b/tests/lib/LegacyHelperTest.php index 21d5dbc8bab..e023819a088 100644 --- a/tests/lib/LegacyHelperTest.php +++ b/tests/lib/LegacyHelperTest.php @@ -112,56 +112,56 @@ class LegacyHelperTest extends \Test\TestCase { $viewMock->expects($this->at(0)) ->method('file_exists') - ->will($this->returnValue(true)); // filename.ext exists + ->willReturn(true); // filename.ext exists $this->assertEquals('dir/filename (2).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename.ext', $viewMock)); $viewMock->expects($this->at(0)) ->method('file_exists') - ->will($this->returnValue(true)); // filename.ext exists + ->willReturn(true); // filename.ext exists $viewMock->expects($this->at(1)) ->method('file_exists') - ->will($this->returnValue(true)); // filename (2).ext exists + ->willReturn(true); // filename (2).ext exists $this->assertEquals('dir/filename (3).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename.ext', $viewMock)); $viewMock->expects($this->at(0)) ->method('file_exists') - ->will($this->returnValue(true)); // filename (1).ext exists + ->willReturn(true); // filename (1).ext exists $this->assertEquals('dir/filename (2).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename (1).ext', $viewMock)); $viewMock->expects($this->at(0)) ->method('file_exists') - ->will($this->returnValue(true)); // filename (2).ext exists + ->willReturn(true); // filename (2).ext exists $this->assertEquals('dir/filename (3).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename (2).ext', $viewMock)); $viewMock->expects($this->at(0)) ->method('file_exists') - ->will($this->returnValue(true)); // filename (2).ext exists + ->willReturn(true); // filename (2).ext exists $viewMock->expects($this->at(1)) ->method('file_exists') - ->will($this->returnValue(true)); // filename (3).ext exists + ->willReturn(true); // filename (3).ext exists $this->assertEquals('dir/filename (4).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename (2).ext', $viewMock)); $viewMock->expects($this->at(0)) ->method('file_exists') - ->will($this->returnValue(true)); // filename(1).ext exists + ->willReturn(true); // filename(1).ext exists $this->assertEquals('dir/filename(2).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename(1).ext', $viewMock)); $viewMock->expects($this->at(0)) ->method('file_exists') - ->will($this->returnValue(true)); // filename(1) (1).ext exists + ->willReturn(true); // filename(1) (1).ext exists $this->assertEquals('dir/filename(1) (2).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename(1) (1).ext', $viewMock)); $viewMock->expects($this->at(0)) ->method('file_exists') - ->will($this->returnValue(true)); // filename(1) (1).ext exists + ->willReturn(true); // filename(1) (1).ext exists $viewMock->expects($this->at(1)) ->method('file_exists') - ->will($this->returnValue(true)); // filename(1) (2).ext exists + ->willReturn(true); // filename(1) (2).ext exists $this->assertEquals('dir/filename(1) (3).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename(1) (1).ext', $viewMock)); $viewMock->expects($this->at(0)) ->method('file_exists') - ->will($this->returnValue(true)); // filename(1) (2) (3).ext exists + ->willReturn(true); // filename(1) (2) (3).ext exists $this->assertEquals('dir/filename(1) (2) (4).ext', OC_Helper::buildNotExistingFileNameForView('dir', 'filename(1) (2) (3).ext', $viewMock)); } |