Passed
Push — master ( 7d7cf1...424d8c )
by Gabriel
37s queued 10s
created

ImpressionThresholdTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 9
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_given_impression_value_then_correct_threshold_reached_state_is_returned() 0 5 1
1
<?php
2
3
declare( strict_types = 1 );
4
5
namespace WMDE\BannerServer\Tests\Unit\Entity\BannerSelection;
6
7
use WMDE\BannerServer\Entity\BannerSelection\ImpressionThreshold;
8
9
/**
10
 * @covers \WMDE\BannerServer\Entity\BannerSelection\ImpressionThreshold
11
 * Class ImpressionThresholdTest
12
 */
13
class ImpressionThresholdTest extends \PHPUnit\Framework\TestCase {
14
15
	const BANNER_TEST_IDENTIFIER = 'testIdentifier';
16
17
	public function test_given_impression_value_then_correct_threshold_reached_state_is_returned() {
18
		$threshold = new ImpressionThreshold( 10 );
19
		$this->assertFalse( $threshold->isThresholdReached( 9 ) );
20
		$this->assertTrue( $threshold->isThresholdReached( 10 ) );
21
		$this->assertTrue( $threshold->isThresholdReached( 11 ) );
22
	}
23
}
24