nette/nette — pull request #602 by MartyIX (2012-03-23 15:02:13+00:00)
Title: Tests: Added tests for Validators::isInRange()

A few tests for isInRange method that was not tested so far.

PS: I was considering to add tests below but the comment attached to Validators::isInRange() says: "@param array min and max value pair" so I reconsidered and I did not include them.

Assert::true( Validators::isInRange(0, array(-1)) ); /* Only minimum specified */
Assert::true( Validators::isInRange(0, array(1 => 1)) ); /* Only maximum specified */
Assert::false( Validators::isInRange(-1, array(0)) ); /* Only minimum specified */
Assert::false( Validators::isInRange(0, array(1 => -1)) ); /* Only maximum specified */