SmokeTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 0
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A parse() 0 7 1
A testSmoke() 0 8 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