Home
last modified time | relevance | path

Searched full:test (Results 1 – 25 of 304) sorted by relevance

12345678910>>...13

/dokuwiki/_test/tests/inc/
H A Dutf8_basename.test.php7 array('/this/foo/bar.test.png', '', 'bar.test.png'),
8 array('\\this\\foo\\bar.test.png', '', 'bar.test.png'),
9 array('/this\\foo/bar.test.png', '', 'bar.test.png'),
10 array('/this/foo\\bar.test.png', '', 'bar.test.png'),
12 array('/this/ДокуВики/bar.test.png', '', 'bar.test.png'),
13 array('\\this\\ДокуВики\\bar.test.png', '', 'bar.test.png'),
14 array('/this\\ДокуВики/bar.test.png', '', 'bar.test.png'),
15 array('/this/ДокуВики\\bar.test.png', '', 'bar.test.png'),
17 array('/this/foo/ДокуВики.test.png', '', 'ДокуВики.test.png'),
18 array('\\this\\foo\\ДокуВики.test.png', '', 'ДокуВики.test.png'),
[all …]
H A Dutf8_correctidx.test.php9 // we test multiple cases here - format: in, offset, length, out
17 foreach($tests as $test){
18 … $this->assertEquals(\dokuwiki\Utf8\Clean::correctIdx($test[0],$test[1],$test[2]),$test[3]);
23 // we test multiple cases here - format: in, offset, length, out
35 foreach($tests as $test){
36 … $this->assertEquals(\dokuwiki\Utf8\Clean::correctIdx($test[0],$test[1],$test[2]),$test[3]);
41 // we test multiple cases here - format: in, offset, length, out
55 foreach($tests as $test){
56 … $this->assertEquals(\dokuwiki\Utf8\Clean::correctIdx($test[0],$test[1],$test[2]),$test[3]);
61 // we test multiple cases here - format: in, offset, length, out
[all …]
H A Dio_readfile.test.php28 …// since git converts line endings, we can't check in this test file but have to create it ourselv…
29 $plain = TMP_DIR.'/test.txt';
30 file_put_contents($plain, "The\015\012Test\015\012");
32 $this->assertEquals("The\012Test\012", io_readFile($plain));
33 $this->assertEquals("The\015\012Test\015\012", io_readFile($plain, false));
41 $this->assertEquals("The\012Test\012", io_readFile(__DIR__.'/io_readfile/test.txt.gz'));
42 …$this->assertEquals("The\015\012Test\015\012", io_readFile(__DIR__.'/io_readfile/test.txt.gz', fal…
51 $this->assertEquals("The\012Test\012", io_readFile(__DIR__.'/io_readfile/test.txt.bz2'));
52 …$this->assertEquals("The\015\012Test\015\012", io_readFile(__DIR__.'/io_readfile/test.txt.bz2', fa…
56 …$this->assertEquals(array("The\015\012","Test\015\012"), bzfile(__DIR__.'/io_readfile/test.txt.bz2…
H A Dutf8_substr.test.php9 // we test multiple cases here - format: in, offset, length, out
23 foreach($tests as $test){
24 … $this->assertEquals(\dokuwiki\Utf8\PhpString::substr($test[0],$test[1],$test[2]),$test[3]);
29 // we test multiple cases here - format: in, offset, length, out
36 foreach($tests as $test){
37 … $this->assertEquals(\dokuwiki\Utf8\PhpString::substr($test[0],$test[1],$test[2]),$test[3]);
H A Dio_replaceinfile.test.php5 …ted $contents = "The\012Delete\012Delete\012Delete01\012Delete02\012Delete\012DeleteX\012Test\012";
34 …The\012Delete00\012Delete\012Delete01\012Delete02\012Delete\012DeleteX\012Test\012", io_readFile($…
37 …e\012Delete00\012DeleteX\012Delete01\012Delete02\012DeleteX\012DeleteX\012Test\012", io_readFile($…
40 …$this->assertEquals("The\01200\012DeleteX\01201\012Delete02\012DeleteX\012DeleteX\012Test\012", io…
43 … $this->assertEquals("The\01200\01201\012Delete02\012Test\012Replace\012", io_readFile($file));
47 $this->_write(TMP_DIR.'/test.txt');
55 $this->_write(TMP_DIR.'/test.txt.gz');
62 $this->_write(TMP_DIR.'/test.txt.bz2');
66 …* Test for a non-regex replacement where $newline contains a backreference like construct - it sho…
70 $file = TMP_DIR . '/test.txt';
[all …]
H A Dparserutils_set_metadata_during_rendering.test.php5 // the id used for this test case
7 // if the test case is currently running
13 * the actual test
21 $this->id = 'test:p_set_metadata_during_rendering';
25 saveWikiText($this->id, 'Test ' . time(), 'Test data setup');
32 ['test_before_set' => 'test']
39 ['test_after_set' => 'test']
43 // Change the global plugin controller so this test can be a fake syntax plugin
55 $this->assertEquals($newMeta[ 'test_before_set' ], 'test');
56 $this->assertEquals($newMeta[ 'test_after_set' ], 'test');
[all …]
H A Dpageutils_findnearest.test.php3 use dokuwiki\test\mock\AuthPlugin;
36 $ID = 'foo:bar:baz:test';
44 saveWikiText('sidebar', 'topsidebar-test', '');
45 saveWikiText('0', 'zero-test', '');
46 saveWikiText('0:0:0', 'zero-test', '');
63 saveWikiText('sidebar', 'topsidebar-test', '');
65 $ID = 'foo:bar:baz:test';
73 saveWikiText('foo:bar:sidebar', 'bottomsidebar-test', '');
75 $ID = 'foo:bar:baz:test';
79 $ID = 'foo:bar:test';
H A Dpageutils_clean_id.test.php94 foreach ($tests as $test) {
96 $sepchar = isset($test[2]['sepchar']) ? $test[2]['sepchar'] : '_';
97 $deaccent = isset($test[2]['deaccent']) ? $test[2]['deaccent'] : 1;
98 $ascii = isset($test[2]['ascii']) ? $test[2]['ascii'] : false;
100 // unless set, test both useslash settings
101 if (isset($test[2]['useslash'])) {
102 yield([$test[0], $test[1], $ascii, $sepchar, $deaccent, $test[2]['useslash']]);
104 yield([$test[0], $test[1], $ascii, $sepchar, $deaccent, 0]);
105 yield([$test[0], $test[1], $ascii, $sepchar, $deaccent, 1]);
H A Dio_deletefromfile.test.php6 $file = TMP_DIR.'/test.txt';
7 $contents = "The\012Delete\012Delete01\012Delete02\012Delete\012DeleteX\012Test\012";
10 … $this->assertEquals("The\012Delete01\012Delete02\012DeleteX\012Test\012", io_readFile($file));
12 $this->assertEquals("The\012DeleteX\012Test\012", io_readFile($file));
H A DJWTTest.php3 namespace dokuwiki\test;
14 $file = JWT::getStorageFile('test');
18 $jwt = JWT::fromUser('test');
20 $this->assertEquals('test', $jwt->getUser());
26 $this->assertEquals('test', $jwt->getUser());
31 $jwt = JWT::fromUser('test');
51 $jwt = JWT::fromUser('test');
53 $file = JWT::getStorageFile('test');
63 $jwt = JWT::fromUser('test');
H A Dio_getSizeFile.test.php26 …// since git converts line endings, we can't check in this test file but have to create it ourselv…
27 $plain = TMP_DIR.'/test.txt';
28 file_put_contents($plain, "The\015\012Test\015\012");
32 $plain_mb = TMP_DIR.'/test.txt';
41 $this->assertEquals(11, io_getSizeFile(__DIR__.'/io_readfile/test.txt.gz'));
44 $gz_mb = TMP_DIR.'/test.txt.gz';
54 $this->assertEquals(11, io_getSizeFile(__DIR__.'/io_readfile/test.txt.bz2'));
59 $bz_mb = TMP_DIR.'/test.txt.bz2';
/dokuwiki/_test/tests/lib/exe/
H A Dcss_css_loadfile.test.php19 …$this->csstest('#test { background: url("test/test.png"); }', '#test { background: url("http://www…
20 …$this->csstest('#test { background: url(\'test/test.png\'); }', '#test { background: url(\'http://…
24 $this->csstest('#test { background: url("/test/test.png"); }');
25 $this->csstest('#test { background: url(\'/test/test.png\'); }');
29 $this->csstest('#test { background: url("http://www.test.com/test/test.png"); }');
30 $this->csstest('#test { background: url("https://www.test.com/test/test.png"); }');
31 $this->csstest('#test { background: url(\'http://www.test.com/test/test.png\'); }');
32 $this->csstest('#test { background: url(\'https://www.test.com/test/test.png\'); }');
36 … $this->csstest('@import "test/test.png";', '@import "http://www.example.com/test/test.png";');
37 … $this->csstest('@import \'test/test.png\';', '@import \'http://www.example.com/test/test.png\';');
[all …]
/dokuwiki/_test/tests/Extension/
H A DEventTest.php3 namespace dokuwiki\test\Extension;
11 $data['test'] = strtoupper($data['test']);
16 $data['test'] = strtoupper($data['test']);
21 $data = 'test';
23 $this->assertEquals('TEST', $result);
28 $data = ['test' => 'test'];
30 $this->assertEquals(['test' => 'TEST'], $data);
35 $data = ['test' => 'test'];
37 $this->assertEquals(['test' => 'TEST'], $data);
39 $data = ['test' => 'test'];
[all …]
/dokuwiki/lib/plugins/config/_test/Setting/
H A DSettingOnoffTest.php3 namespace dokuwiki\plugin\config\test\Setting;
16 [1, "\$conf['test'] = 1;\n"],
17 [0, "\$conf['test'] = 0;\n"],
19 ['1', "\$conf['test'] = 1;\n"],
20 ['0', "\$conf['test'] = 0;\n"],
22 ['on', "\$conf['test'] = 1;\n"],
23 ['off', "\$conf['test'] = 0;\n"],
25 ['true', "\$conf['test'] = 1;\n"],
26 ['false', "\$conf['test'] = 0;\n"],
28 ['On', "\$conf['test'] = 1;\n"],
[all …]
H A DAbstractSettingTest.php3 namespace dokuwiki\plugin\config\test\Setting;
9 /** @var string the class to test */
13 * Sets up the proper class to test based on the test's class name
26 $setting = new $this->class('test');
27 $this->assertEquals('test', $setting->getKey());
36 $setting = new $this->class('test');
42 $setting = new $this->class('test');
43 $this->assertEquals('test', $setting->getPrettyKey(false));
46 $this->assertEquals('test»foo', $setting->getPrettyKey(false));
48 $setting = new $this->class('test');
[all …]
H A DSettingNumericTest.php3 namespace dokuwiki\plugin\config\test\Setting;
16 [42, "\$conf['test'] = 42;\n"],
17 [0, "\$conf['test'] = 0;\n"],
18 [-42, "\$conf['test'] = -42;\n"],
19 [-42.13, "\$conf['test'] = -42.13;\n"],
20 ['12*13', "\$conf['test'] = 12*13;\n"],
/dokuwiki/_test/tests/Search/
H A DMediauseTest.php3 namespace dokuwiki\test\Search;
9 * Test cases for the media usage search
17 …saveWikiText('test:internalmedia_usage', '{{internalmedia.png}} {{..:internal media.png}}', 'Test
18 (new Indexer())->addPage('test:internalmedia_usage');
21 … $this->assertEquals(array('test:internalmedia_usage'), $search->mediause('internal_media.png'));
22 …$this->assertEquals(array('test:internalmedia_usage'), $search->mediause('test:internalmedia.png')…
27 …saveWikiText('test:medialinks', '[[doku>wiki:dokuwiki|{{wiki:logo.png}}]] [[http://www.example.com…
28 (new Indexer())->addPage('test:medialinks');
31 $this->assertEquals(array('test:medialinks'), $search->mediause('wiki:logo.png'));
32 $this->assertEquals(array('test:medialinks'), $search->mediause('test:example.png'));
[all …]
H A DBacklinksTest.php3 namespace dokuwiki\test\Search;
9 * Test cases for the backlinks search
17 …saveWikiText('test:internallinks', '[[internälLink]] [[..:internal link]]', 'Test initialization');
18 (new Indexer())->addPage('test:internallinks');
21 $this->assertEquals(array('test:internallinks'), $search->backlinks('internal_link'));
22 $this->assertEquals(array('test:internallinks'), $search->backlinks('test:internaellink'));
27 … saveWikiText('test:link_footnotes', '(([[footnote]] [[:foÖtnotel]]))', 'Test initialization');
28 (new Indexer())->addPage('test:link_footnotes');
31 $this->assertEquals(array('test:link_footnotes'), $search->backlinks('test:footnote'));
32 $this->assertEquals(array('test:link_footnotes'), $search->backlinks('fooetnotel'));
[all …]
/dokuwiki/_test/tests/Search/Query/
H A DQueryParserTest.php3 namespace dokuwiki\test\Search\Query;
8 * Test cases for the QueryParser
16 $inputQuery = 'test -baz "foo bar" @abc ^def';
21 'query' => 'test -baz "foo bar" @abc ^def',
22 …'parsed_str' => '(W+:test)ANDNOT((W-:baz))AND((W_:foo)AND(W_:bar)AND(P+:foo bar))AND(N+:abc)ANDNOT…
24 'W+:test',
41 'test',
47 'test',
51 'test',
72 ['test'],
[all …]
/dokuwiki/_test/tests/Parsing/ParserMode/
H A DFileTest.php3 namespace dokuwiki\test\Parsing\ParserMode;
16 $this->P->parse('Foo <file>Test</file> Bar');
22 ['file',['Test',null,null]],
32 $this->P->parse('Foo <file txt test.txt>Test</file> Bar');
38 ['file',['Test','txt','test.txt']],
48 $this->P->parse('Foo <file2>Test</file2> Bar');
52 ['cdata',["\n".'Foo <file2>Test</file2> Bar']],
H A DCodeTest.php3 namespace dokuwiki\test\Parsing\ParserMode;
21 $this->P->parse('Foo <code>Test</code> Bar');
27 ['code',['Test',null,null]],
37 $this->P->parse('Foo <code bash>Test</code> Bar');
43 ['code',['Test','bash',null]],
53 $this->P->parse('Foo <code bash script.sh>Test</code> Bar');
59 ['code',['Test','bash','script.sh']],
69 $this->P->parse('Foo <code2>Bar</code2><code>Test</code>');
75 ['code',['Test',null,null]],
82 $this->P->parse('Foo <code C [enable_line_numbers]>Test</code> Bar');
[all …]
/dokuwiki/_test/tests/
H A DMailUtilsTest.php3 namespace dokuwiki\test;
180 ['_foo@test.com', true], // FS#1049
192 ['test@example', true], // we allow local addresses
195 ['test@example.com', true],
196 ['TEST@example.com', true],
198 ['test+test@example.com', true],
199 ['test-test@example.com', true],
203 ['"[[ test ]]"@example.com', true],
204 ['test.test@example.com', true],
205 ['test."test"@example.com', true],
[all …]
/dokuwiki/_test/tests/Subscriptions/
H A DBulkSubscriptionsSenderTest.php3 namespace dokuwiki\test\Subscriptions;
7 use dokuwiki\test\mock\MailerMock;
38 $this->assertEquals(0, $sub->sendBulk('sub1:test'));
45 saveWikiText('sub1:test', 'foo bar', 'a subscription change', false);
48 $this->assertEquals(1, $sub->sendBulk('sub1:test'));
55 saveWikiText('sub1:sub2:test', 'foo bar', 'a subscription change', false);
59 $this->assertEquals(0, $sub->sendBulk('sub1:test'));
66 $this->assertEquals(3, $sub->sendBulk('sub1:test'));
80 $this->assertEquals(0, $sub->sendBulk('sub1:test'));
87 saveWikiText('sub1:test', 'foo bar', 'a subscription change', false);
[all …]
/dokuwiki/_test/data/pages/int/
H A Deditandsavetest.txt1 This is a test page for testing the redirect happening on the ''edit and save'' workflow.
2 This page is required for the tests in **_tests/test/test/edit_and_save.test.php**. Do not edit thi…
/dokuwiki/_test/
H A Dphpunit.xml22 <directory suffix=".test.php">tests/</directory>
23 <directory suffix="Test.php">tests/</directory>
26 <directory suffix=".test.php">../lib/plugins/*/_test/</directory>
27 <directory suffix="Test.php">../lib/plugins/*/_test/</directory>
30 <directory suffix=".test.php">../lib/tpl/*/_test/</directory>
31 <directory suffix="Test.php">../lib/tpl/*/_test/</directory>

12345678910>>...13