Home
last modified time | relevance | path

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

1234567891011

/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 Dmail_isvalid.test.php13 array('_foo@test.com', true), // FS#1049
25 array('test@example', true), // we allow local addresses
29 array('test@example.com', true),
30 array('TEST@example.com', true),
32 array('test+test@example.com', true),
33 array('test-test@example.com', true),
37 array('"[[ test ]]"@example.com', true),
38 array('test.test@example.com', true),
39 array('test."test"@example.com', true),
40 array('"test@test"@example.com', true),
[all …]
H A Dfulltext_mediause.test.php7 * Test cases for the media usage index
14 …saveWikiText('test:internalmedia_usage', '{{internalmedia.png}} {{..:internal media.png}}', 'Test
15 idx_addPage('test:internalmedia_usage');
17 $this->assertEquals(array('test:internalmedia_usage'), ft_mediause('internal_media.png'));
18 … $this->assertEquals(array('test:internalmedia_usage'), ft_mediause('test:internalmedia.png'));
22 …saveWikiText('test:medialinks', '[[doku>wiki:dokuwiki|{{wiki:logo.png}}]] [[http://www.example.com…
23 idx_addPage('test:medialinks');
25 $this->assertEquals(array('test:medialinks'), ft_mediause('wiki:logo.png'));
26 $this->assertEquals(array('test:medialinks'), ft_mediause('test:example.png'));
30 saveWikiText('test:locallinks', '[[#test|{{wiki:logolocal.png}}]]', 'Test init');
[all …]
H A Dfulltext_backlinks.test.php7 * Test cases for the link index
14 …saveWikiText('test:internallinks', '[[internälLink]] [[..:internal link]]', 'Test initialization');
15 idx_addPage('test:internallinks');
17 $this->assertEquals(array('test:internallinks'), ft_backlinks('internal_link'));
18 $this->assertEquals(array('test:internallinks'), ft_backlinks('test:internaellink'));
22 … saveWikiText('test:link_footnotes', '(([[footnote]] [[:foÖtnotel]]))', 'Test initialization');
23 idx_addPage('test:link_footnotes');
25 $this->assertEquals(array('test:link_footnotes'), ft_backlinks('test:footnote'));
26 $this->assertEquals(array('test:link_footnotes'), ft_backlinks('fooetnotel'));
32 saveWikiText('hidden:links', '[[wiki:hiddenlink|linktitle]]', 'Test initialization');
[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 DFulltextPageLookupTest.php5 * Test cases search only in a namespace or exclude a namespace
10 saveWikiText('test:page1', 'Some text', 'Test initialization');
11 idx_addPage('test:page1');
12 saveWikiText('ns:page2', 'Other text', 'Test initialization');
14 saveWikiText('ns:utf8', '====== Title with ÄöÜ ======', 'Test initialization');
17 $this->assertEquals(['test:page1' => null, 'ns:page2' => null], ft_pageLookup('page'));
18 $this->assertEquals(['test:page1' => null], ft_pageLookup('page @test'));
19 $this->assertEquals(['ns:page2' => null], ft_pageLookup('page ^test'));
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 Dfulltext_query.test.php9 * Test cases for the link index
20 $inputQuery = 'test -baz "foo bar" @abc ^def';
25 'query' => 'test -baz "foo bar" @abc ^def',
26 …'parsed_str' => '(W+:test)ANDNOT((W-:baz))AND((W_:foo)AND(W_:bar)AND(P+:foo bar))AND(N+:abc)ANDNOT…
28 'W+:test',
45 'test',
51 'test',
55 'test',
77 'test',
101 $expectedQuery = 'test -baz "foo bar" @abc ^def';
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/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/tests/inc/parser/
H A Dparser_file.test.php15 $this->P->parse('Foo <file>Test</file> Bar');
21 array('file',array('Test',null,null)),
31 $this->P->parse('Foo <file txt test.txt>Test</file> Bar');
37 array('file',array('Test','txt','test.txt')),
47 $this->P->parse('Foo <file2>Test</file2> Bar');
51 array('cdata',array("\n".'Foo <file2>Test</file2> Bar')),
H A Dparser_code.test.php20 $this->P->parse('Foo <code>Test</code> Bar');
26 array('code',array('Test',null,null)),
36 $this->P->parse('Foo <code bash>Test</code> Bar');
42 array('code',array('Test','bash',null)),
52 $this->P->parse('Foo <code bash script.sh>Test</code> Bar');
58 array('code',array('Test','bash','script.sh')),
68 $this->P->parse('Foo <code2>Bar</code2><code>Test</code>');
74 array('code',array('Test',null,null)),
81 $this->P->parse('Foo <code C [enable_line_numbers]>Test</code> Bar');
87 array('code',array('Test','C', null,
[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…

1234567891011