Skip to content

Commit

Permalink
Add a basic sequence generation test
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Aug 19, 2014
1 parent 1c35a95 commit f60d701
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions framework/Imap_Client/test/Horde/Imap/Client/IdsTest.php
Expand Up @@ -308,4 +308,26 @@ public function testReverse()
);
}

/**
* @dataProvider sequenceStringGenerationProvider
*/
public function testSequenceStringGeneration($in, $expected)
{
$ids = new Horde_Imap_Client_Ids($in);

$this->assertEquals(
$expected,
strval($ids)
);
}

public function sequenceStringGenerationProvider()
{
return array(
array(array(1, 2, 3), '1:3'),
array(array(3, 2, 1), '3,2,1'),
array(array(1, 2, 3, 5), '1:3,5')
);
}

}

0 comments on commit f60d701

Please sign in to comment.