Fixed filesize issue in watchr test

Added clearstatcache to make sure we get the correct file size after
re-writing into the same file.

This failed on openSUSE 12.3 x86_64
remotes/origin/stable6
Vincent Petry 12 years ago
parent d48ba5a5bf
commit 7ff6a642b4
  1. 3
      tests/lib/files/cache/watcher.php

@ -53,6 +53,9 @@ class Watcher extends \PHPUnit_Framework_TestCase {
$cache->put('bar.test', array('storage_mtime' => 10));
$storage->file_put_contents('bar.test', 'test data');
// make sure that PHP can read the new size correctly
clearstatcache();
$updater->checkUpdate('bar.test');
$cachedData = $cache->get('bar.test');
$this->assertEquals(9, $cachedData['size']);

Loading…
Cancel
Save