RevisionTest::testDataIsRetained()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 9.7666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Tests\Queryr\DumpReader;
4
5
use Queryr\DumpReader\Revision;
6
7
/**
8
 * @covers Queryr\DumpReader\Revision
9
 *
10
 * @licence GNU GPL v2+
11
 * @author Jeroen De Dauw < [email protected] >
12
 */
13
class RevisionTest extends \PHPUnit_Framework_TestCase {
14
15
	public function testDataIsRetained() {
16
		$id = 42;
17
		$model = 'cats';
18
		$format = 'spam';
19
		$text = 'foo';
20
		$timeStamp = 'bar';
21
22
		$page = new Revision( $id, $model, $format, $text, $timeStamp );
23
24
		$this->assertSame( $id, $page->getId() );
25
		$this->assertSame( $model, $page->getModel() );
26
		$this->assertSame( $format, $page->getFormat() );
27
		$this->assertSame( $text, $page->getText() );
28
		$this->assertSame( $timeStamp, $page->getTimeStamp() );
29
	}
30
31
	public function testGivenStringId_getterReturnsInteger() {
32
		$page = new Revision( '42', '', '', '', '' );
33
		$this->assertSame( 42, $page->getId() );
34
	}
35
36
}