Skip to content

Commit

Permalink
Adds test for filtering messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobemerick committed Dec 20, 2015
1 parent 9f9b7a4 commit 8f39381
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/unit/DisplayTest.php
Expand Up @@ -212,6 +212,21 @@ public function testGetFileList($fileData, $expectedMeta, $expectedList)
$this->assertEquals($expectedList, $fileList);
}

public function testFilterMessages()
{
$display = new Display();
$reflectedMethod = $this->getAccessibleMethod($display, 'filterMessages');

$filteredMessages = $reflectedMethod->invokeArgs($display, array(array(array(
'type' => 'remove'
)), 'keep'));
$this->assertEmpty($filteredMessages);
$filteredMessages = $reflectedMethod->invokeArgs($display, array(array(array(
'type' => 'keep'
)), 'keep'));
$this->assertCount(1, $filteredMessages);
}

public function testGetReadableTime()
{
$timeTest = array(
Expand Down

0 comments on commit 8f39381

Please sign in to comment.