SmokeTest::parse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace IdGenerator\Tests;
6
7
use PHPUnit\Framework\TestCase;
8
9
/**
10
 * @ingroup Database
11
 */
12
class SmokeTest extends TestCase {
13
14
	private function parse( string $textToParse ): string {
15
		$parser = new \Parser();
16
		$options = new \ParserOptions();
17
		$options->setOption( 'wrapclass', false );
18
19
		return $parser->parse( $textToParse, \Title::newMainPage(), $options )->getText();
20
	}
21
22
	public function testSmoke() {
23
		$idType = (string)rand() . (string)rand();
24
25
		$this->assertContains(
26
			"<p>1\n",
27
			$this->parse( "{{#next_number:$idType}}" )
28
		);
29
	}
30
31
}
32