[ Index ] |
PHP Cross Reference of DokuWiki |
[Summary view] [Print] [Text view]
1 <?php 2 3 4 /** 5 * Test cases search only in a namespace or exclude a namespace 6 */ 7 class FulltextPageLookupTest extends DokuWikiTest { 8 9 public function test_inoutns() { 10 saveWikiText('test:page1', 'Some text', 'Test initialization'); 11 idx_addPage('test:page1'); 12 saveWikiText('ns:page2', 'Other text', 'Test initialization'); 13 idx_addPage('ns:page2'); 14 saveWikiText('ns:utf8', '====== Title with ÄöÜ ======', 'Test initialization'); 15 idx_addPage('ns:utf8'); 16 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')); 20 21 $this->assertEquals(['ns:utf8' => 'Title with ÄöÜ'], ft_pageLookup('title', false, true)); 22 $this->assertEquals(['ns:utf8' => 'Title with ÄöÜ'], ft_pageLookup('äöü', false, true)); 23 } 24 25 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body