Skip to content

Commit

Permalink
Markdown processing code cleanup, step 4 - tests
Browse files Browse the repository at this point in the history
Issue #34040, PR #1929

Signed-off-by: Damien Regad <dregad@mantisbt.org>
  • Loading branch information
grummbeer committed Mar 13, 2024
1 parent eb35083 commit 95d687d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/MantisCoreFormatting/tests/MarkdownTest.php
Expand Up @@ -24,7 +24,7 @@
*/

# Includes
require_once( dirname( __FILE__, 2 ) . '../../../tests/TestConfig.php' );
require_once( dirname( __FILE__, 2 ) . '/../../tests/TestConfig.php' );
require_once( dirname( __FILE__, 2 ) . '/core/MantisMarkdown.php' );

# MantisBT Core API
Expand All @@ -46,7 +46,7 @@ class MantisMarkdownTest extends PHPUnit\Framework\TestCase {
*/
public function testHashLetters() {
$this->assertEquals( '<h1>hello</h1>', MantisMarkdown::convert_text( '# hello' ) );
$this->assertEquals( '<h1>hello</h1>', MantisMarkdown::convert_text( '#hello' ) );
$this->assertEquals( '<p>#hello</p>', MantisMarkdown::convert_text( '#hello' ) );
}

/**
Expand All @@ -55,7 +55,7 @@ public function testHashLetters() {
*/
public function testHashNumberAny() {
$this->assertEquals( '<h1>1abcd</h1>', MantisMarkdown::convert_text( '# 1abcd' ) );
$this->assertEquals( '<h1>1abcd</h1>', MantisMarkdown::convert_text( '#1abcd' ) );
$this->assertEquals( '<p>#1abcd</p>', MantisMarkdown::convert_text( '#1abcd' ) );
}

/**
Expand All @@ -64,7 +64,7 @@ public function testHashNumberAny() {
*/
public function testHashLettersAny() {
$this->assertEquals( '<h1>abcd1234</h1>', MantisMarkdown::convert_text( '# abcd1234' ) );
$this->assertEquals( '<h1>abcd1234</h1>', MantisMarkdown::convert_text( '#abcd1234' ) );
$this->assertEquals( '<p>#abcd1234</p>', MantisMarkdown::convert_text( '#abcd1234' ) );
}

/**
Expand Down

0 comments on commit 95d687d

Please sign in to comment.