|
@@ 174-187 (lines=14) @@
|
| 171 |
|
return ((new DateTime($rowA['date'])) < (new DateTime($rowB['date']))); |
| 172 |
|
}); |
| 173 |
|
|
| 174 |
|
foreach ($testData as $key => $testRow) { |
| 175 |
|
$this->assertArrayHasKey('id', $data[$key]); |
| 176 |
|
$this->assertEquals($testRow['id'], $data[$key]['id']); |
| 177 |
|
$this->assertArrayHasKey('title', $data[$key]); |
| 178 |
|
$this->assertEquals($testRow['title'], $data[$key]['title']); |
| 179 |
|
$this->assertArrayHasKey('path', $data[$key]); |
| 180 |
|
$this->assertEquals($testRow['path'], $data[$key]['path']); |
| 181 |
|
$this->assertArrayHasKey('date', $data[$key]); |
| 182 |
|
$this->assertEquals($testRow['date'], $data[$key]['date']); |
| 183 |
|
$this->assertArrayHasKey('body', $data[$key]); |
| 184 |
|
$this->assertEquals($testRow['body'], $data[$key]['body']); |
| 185 |
|
$this->assertArrayHasKey('category', $data[$key]); |
| 186 |
|
$this->assertEquals($testRow['category'], $data[$key]['category']); |
| 187 |
|
} |
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
public function testGetActivePostsInactive() |
|
@@ 412-425 (lines=14) @@
|
| 409 |
|
$this->assertNotFalse($data); |
| 410 |
|
$this->assertInternalType('array', $data); |
| 411 |
|
$this->assertCount(count($testPostData), $data); |
| 412 |
|
foreach ($testPostData as $key => $testPostRow) { |
| 413 |
|
$this->assertArrayHasKey('id', $data[$key]); |
| 414 |
|
$this->assertEquals($testPostRow['id'], $data[$key]['id']); |
| 415 |
|
$this->assertArrayHasKey('title', $data[$key]); |
| 416 |
|
$this->assertEquals($testPostRow['title'], $data[$key]['title']); |
| 417 |
|
$this->assertArrayHasKey('path', $data[$key]); |
| 418 |
|
$this->assertEquals($testPostRow['path'], $data[$key]['path']); |
| 419 |
|
$this->assertArrayHasKey('date', $data[$key]); |
| 420 |
|
$this->assertEquals($testPostRow['date'], $data[$key]['date']); |
| 421 |
|
$this->assertArrayHasKey('body', $data[$key]); |
| 422 |
|
$this->assertEquals($testPostRow['body'], $data[$key]['body']); |
| 423 |
|
$this->assertArrayHasKey('category', $data[$key]); |
| 424 |
|
$this->assertEquals($testPostRow['category'], $data[$key]['category']); |
| 425 |
|
} |
| 426 |
|
} |
| 427 |
|
|
| 428 |
|
public function testGetActivePostsByTagInactive() |