*/
public function testSimplePutFails() {
// setup
- $view = $this->getMock('\OC\Files\View', array('file_put_contents', 'getRelativePath'), array(), '', false);
+ $view = $this->getMock('\OC\Files\View', array('file_put_contents', 'getRelativePath'), array());
$view->expects($this->any())
->method('file_put_contents')
->will($this->returnValue(false));
public function testSimplePutFailsOnRename() {
// setup
$view = $this->getMock('\OC\Files\View',
- array('file_put_contents', 'rename', 'getRelativePath', 'filesize'),
- array(), '', false);
+ array('file_put_contents', 'rename', 'getRelativePath', 'filesize'));
$view->expects($this->any())
->method('file_put_contents')
->withAnyParameters()
*/
public function testSimplePutInvalidChars() {
// setup
- $view = $this->getMock('\OC\Files\View', array('file_put_contents', 'getRelativePath'), array(), '', false);
+ $view = $this->getMock('\OC\Files\View', array('file_put_contents', 'getRelativePath'));
$view->expects($this->any())
->method('file_put_contents')
->will($this->returnValue(false));
*/
public function testSetNameInvalidChars() {
// setup
- $view = $this->getMock('\OC\Files\View', array('getRelativePath'), array(), '', false);
+ $view = $this->getMock('\OC\Files\View', array('getRelativePath'));
$view->expects($this->any())
->method('getRelativePath')
public function testUploadAbort() {
// setup
$view = $this->getMock('\OC\Files\View',
- array('file_put_contents', 'rename', 'getRelativePath', 'filesize'),
- array(), '', false);
+ array('file_put_contents', 'rename', 'getRelativePath', 'filesize'));
$view->expects($this->any())
->method('file_put_contents')
->withAnyParameters()
$rootView->putFileInfo('foo.txt', array('storage_mtime' => 1000)); //make sure the watcher detects the change
$rootView->file_put_contents('foo.txt', 'asd');
$cachedData = $rootView->getFileInfo('foo.txt');
- $this->assertGreaterThanOrEqual($cachedData['mtime'], $oldCachedData['mtime']);
+ $this->assertGreaterThanOrEqual($oldCachedData['mtime'], $cachedData['mtime']);
$this->assertEquals($cachedData['storage_mtime'], $cachedData['mtime']);
}