Permalink
Browse files

add test case to test ColumnMap->isInteger() method

  • Loading branch information...
woodspire committed Dec 4, 2012
1 parent 6232333 commit d72b1b6a8e3bb681cd7734ba4abd57f29cd23f6c
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/testsuite/runtime/map/ColumnMapTest.php
@@ -149,4 +149,14 @@ public function testIsPrimaryString()
$titleColumn->setPrimaryString(true);
$this->assertTrue($titleColumn->isPrimaryString(), 'isPrimaryString() returns true if set.');
}
+
+ public function testIsInteger()
+ {
+ $bookTable = BookPeer::getTableMap();
+ $idColumn = $bookTable->getColumn('id'); // INTEGER
+ $titleColumn = $bookTable->getColumn('title'); // VARCHAR
+
+ $this->assertTrue($idColumn->isInteger(), 'IsInteger() returns true');
+ $this->assertFalse($titleColumn->isInteger(), 'IsInteger() returns false');
+ }
}

0 comments on commit d72b1b6

Please sign in to comment.