Skip to content

Commit

Permalink
* test for period validation
Browse files Browse the repository at this point in the history
  • Loading branch information
till committed Jul 8, 2011
1 parent 656526c commit 07714be
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/Services/NYTimes/NewswireTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,24 @@ public function testMagic($param, $value)
/**
* Throw an exception for bogus source.
*
* @return void
*
* @expectedException \InvalidArgumentException
*/
public function testSetSource()
{
$this->nw->setSource('Interweb');
}

/**
* Throw a RangeException if the period is out of the range.
*
* @return void
*
* @expectedException \RangeException
*/
public function testSetPeriod()
{
$this->nw->setPeriod(1000); // 1–720 supported
}
}

0 comments on commit 07714be

Please sign in to comment.