From 22cf19e174bcee88b44968f2773d1bad2da2b54d Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 18 Jul 2012 03:59:10 -0700 Subject: bad sync with github windows client --- .../tests/HTMLPurifier/AttrDef/IntegerTest.php | 61 ---------------------- 1 file changed, 61 deletions(-) delete mode 100644 lib/htmlpurifier/tests/HTMLPurifier/AttrDef/IntegerTest.php (limited to 'lib/htmlpurifier/tests/HTMLPurifier/AttrDef/IntegerTest.php') diff --git a/lib/htmlpurifier/tests/HTMLPurifier/AttrDef/IntegerTest.php b/lib/htmlpurifier/tests/HTMLPurifier/AttrDef/IntegerTest.php deleted file mode 100644 index a941e31ab..000000000 --- a/lib/htmlpurifier/tests/HTMLPurifier/AttrDef/IntegerTest.php +++ /dev/null @@ -1,61 +0,0 @@ -def = new HTMLPurifier_AttrDef_Integer(); - - $this->assertDef('0'); - $this->assertDef('1'); - $this->assertDef('-1'); - $this->assertDef('-10'); - $this->assertDef('14'); - $this->assertDef('+24', '24'); - $this->assertDef(' 14 ', '14'); - $this->assertDef('-0', '0'); - - $this->assertDef('-1.4', false); - $this->assertDef('3.4', false); - $this->assertDef('asdf', false); // must not return zero - $this->assertDef('2in', false); // must not return zero - - } - - function assertRange($negative, $zero, $positive) { - $this->assertDef('-100', $negative); - $this->assertDef('-1', $negative); - $this->assertDef('0', $zero); - $this->assertDef('1', $positive); - $this->assertDef('42', $positive); - } - - function testRange() { - - $this->def = new HTMLPurifier_AttrDef_Integer(false); - $this->assertRange(false, true, true); // non-negative - - $this->def = new HTMLPurifier_AttrDef_Integer(false, false); - $this->assertRange(false, false, true); // positive - - - // fringe cases - - $this->def = new HTMLPurifier_AttrDef_Integer(false, false, false); - $this->assertRange(false, false, false); // allow none - - $this->def = new HTMLPurifier_AttrDef_Integer(true, false, false); - $this->assertRange(true, false, false); // negative - - $this->def = new HTMLPurifier_AttrDef_Integer(false, true, false); - $this->assertRange(false, true, false); // zero - - $this->def = new HTMLPurifier_AttrDef_Integer(true, true, false); - $this->assertRange(true, true, false); // non-positive - - } - -} - -// vim: et sw=4 sts=4 -- cgit v1.2.3