Skip to content

Commit

Permalink
Added special test case. Refs #3044
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidePrincipi committed Mar 2, 2015
1 parent f400c86 commit 913ca27
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Nethgui/Test/Unit/Nethgui/System/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,4 +609,14 @@ public function testCidrBlock()
$this->assertFalse($o->evaluate('12.13.14.300/12'));
}

public function testBug3044()
{
$o = $this->object->integer()->greatThan(0)->lessThan(256);
$this->assertTrue($o->evaluate('1'));
$this->assertTrue($o->evaluate('255'));
$this->assertTrue($o->evaluate('32'));
$this->assertFalse($o->evaluate('01'));
$this->assertFalse($o->evaluate(' 1'));
$this->assertFalse($o->evaluate('255 '));
}
}

0 comments on commit 913ca27

Please sign in to comment.