Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into FS#2697searchpagere…
…adonly Conflicts: inc/lang/hr/searchpage.txt inc/lang/ko/searchpage.txt
- Loading branch information
Showing
791 changed files
with
35,580 additions
and
24,153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; http://editorconfig.org/ | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[inc/{geshi,phpseclib}/**] | ||
; Use editor default (possible autodetection). | ||
indent_style = | ||
indent_size = | ||
trim_trailing_whitespace = false | ||
insert_final_newline = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
|
||
/** | ||
* Class cache_use_test | ||
* | ||
* Tests if caching can actually be used | ||
*/ | ||
class cache_use_test extends DokuWikiTest { | ||
/** @var cache_renderer $cache */ | ||
private $cache; | ||
|
||
function setUp() { | ||
global $ID, $conf; | ||
parent::setUp(); | ||
|
||
$ID = 'cached'; | ||
$file = wikiFN($ID); | ||
$conf['cachetime'] = 0; // ensure the value is not -1, which disables caching | ||
|
||
saveWikiText($ID, 'Content', 'Created'); | ||
|
||
$this->cache = new cache_renderer($ID, $file, 'xhtml'); | ||
$this->cache->storeCache('Test'); | ||
|
||
// set the modification times explicitly (overcome Issue #694) | ||
$time = time(); | ||
touch($file, $time-1); | ||
touch($this->cache->cache, $time); | ||
} | ||
|
||
function test_use() { | ||
$this->markTestSkipped('Disabled until Ticket #694 has been fixed'); | ||
return; | ||
|
||
$this->assertTrue($this->cache->useCache()); | ||
} | ||
|
||
/** | ||
* In all the following tests the cache should not be usable | ||
* as such, they are meaningless if test_use didn't pass. | ||
* | ||
* @depends test_use | ||
*/ | ||
function test_purge() { | ||
/* @var Input $INPUT */ | ||
global $INPUT; | ||
$INPUT->set('purge',1); | ||
|
||
$this->assertFalse($this->cache->useCache()); | ||
$this->assertNotEmpty($this->cache->depends['purge']); | ||
} | ||
|
||
/** | ||
* @depends test_use | ||
*/ | ||
function test_filedependency() { | ||
// give the dependent src file the same mtime as the cache | ||
touch($this->cache->file, filemtime($this->cache->cache)); | ||
$this->assertFalse($this->cache->useCache()); | ||
} | ||
|
||
/** | ||
* @depends test_use | ||
*/ | ||
function test_age() { | ||
// need to age both our source file & the cache | ||
$age = 10; | ||
$time = time() - $age - 1; // older than age | ||
|
||
touch($this->cache->file, $time - 1); | ||
touch($this->cache->cache, $time); | ||
|
||
$this->assertFalse($this->cache->useCache(array('age' => $age))); | ||
} | ||
|
||
/** | ||
* @depends test_use | ||
*/ | ||
function test_confnocaching() { | ||
global $conf; | ||
$conf['cachetime'] = -1; // disables renderer caching | ||
|
||
$this->assertFalse($this->cache->useCache()); | ||
$this->assertNotEmpty($this->cache->_nocache); | ||
} | ||
} |
Oops, something went wrong.