Skip to content

Commit

Permalink
Fix PHPUnit warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
michitux committed Sep 22, 2023
1 parent d84b253 commit 02c330c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions _test/locallink_conversion.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public function setUp() : void

public function testLocalConverted() {
$html = p_wiki_xhtml('test:includefirst');
$this->assertContains('href="'.wl('included').'#jump"', $html);
$this->assertNotContains('href="#jump"', $html);
$this->assertStringContainsString('href="'.wl('included').'#jump"', $html);
$this->assertStringNotContainsString('href="#jump"', $html);
}

public function testLocalExistsIfIncluded() {
$html = p_wiki_xhtml('test:includefull');
$this->assertContains('href="#jump"', $html);
$this->assertStringContainsString('href="#jump"', $html);
}
}
8 changes: 4 additions & 4 deletions _test/media_linktitle_conversion.test.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ public function setUp() : void

public function testInternalLinkTitleConversion() {
$html = p_wiki_xhtml('test:include');
$this->assertContains('src="'.ml('wiki:dokuwiki.png').'"', $html);
$this->assertStringContainsString('src="'.ml('wiki:dokuwiki.png').'"', $html);
}

public function testLocalLinkTitleConversion() {
$html = p_wiki_xhtml('test:include');
$this->assertContains('src="'.ml('wiki:dokuwiki.png', array('w' => '200')).'"', $html);
$this->assertStringContainsString('src="'.ml('wiki:dokuwiki.png', array('w' => '200')).'"', $html);
}

public function testInterWikiLinkTitleConversion() {
$html = p_wiki_xhtml('test:include');
$this->assertContains('src="'.ml('wiki:dokuwiki.png', array('w' => '300')).'"', $html);
$this->assertStringContainsString('src="'.ml('wiki:dokuwiki.png', array('w' => '300')).'"', $html);
}

public function testExternalMediaNotConverted() {
$html = p_wiki_xhtml('test:include');
$this->assertContains('src="'.ml('https://www.dokuwiki.org/lib/tpl/dokuwiki/images/logo.png').'"', $html);
$this->assertStringContainsString('src="'.ml('https://www.dokuwiki.org/lib/tpl/dokuwiki/images/logo.png').'"', $html);
}
}

0 comments on commit 02c330c

Please sign in to comment.