1 | <?php |
||
15 | class PageTest extends TestCase |
||
16 | { |
||
17 | private $page, $created, $updated; |
||
18 | |||
19 | protected function setUp() |
||
20 | { |
||
21 | $this->created = new \DateTime(); |
||
22 | $this->updated = new \DateTime(); |
||
23 | $this->page = new Page('test-id', 'TestTitle', 'testContent', $this->created, $this->updated, true, 'testTemplate'); |
||
24 | } |
||
25 | |||
26 | public function testGetId() |
||
27 | { |
||
28 | $this->assertSame('test-id', $this->page->getId()); |
||
29 | } |
||
30 | |||
31 | public function testGetTitle() |
||
32 | { |
||
33 | $this->assertSame('TestTitle', $this->page->getTitle()); |
||
34 | } |
||
35 | |||
36 | public function testGetContent() |
||
37 | { |
||
38 | $this->assertSame('testContent', $this->page->getContent()); |
||
39 | } |
||
40 | |||
41 | public function testGetCreated() |
||
42 | { |
||
43 | $this->assertSame($this->created, $this->page->getCreated()); |
||
44 | } |
||
45 | |||
46 | public function testGetUpdated() |
||
47 | { |
||
48 | $this->assertSame($this->updated, $this->page->getUpdated()); |
||
49 | } |
||
50 | |||
51 | public function testIsDraft() |
||
52 | { |
||
53 | $this->assertTrue($this->page->isDraft()); |
||
54 | } |
||
55 | |||
56 | public function testGetTemplate() |
||
57 | { |
||
58 | $this->assertSame('testTemplate', $this->page->getTemplate()); |
||
59 | } |
||
60 | |||
61 | public function testGetType() |
||
62 | { |
||
63 | $this->assertSame('page', $this->page->getType()); |
||
64 | } |
||
65 | } |