public function testFormatOneWithOneRowAndValueEqualsZero()
 {
     $con = Propel::getConnection(BookPeer::DATABASE_NAME);
     $stmt = $con->query('SELECT 0 FROM book LIMIT 0, 1');
     $formatter = new PropelSimpleArrayFormatter();
     $formatter->init(new ModelCriteria('bookstore', 'Book'));
     $book = $formatter->formatOne($stmt);
     $this->assertSame('0', $book);
 }
 public function testFormatOneWithOneRowAndValueBooleanEqualsFalse()
 {
     $con = Propel::getConnection(BookPeer::DATABASE_NAME);
     $stmt = $con->query('SELECT false FROM book LIMIT 1 OFFSET 0');
     $formatter = new PropelSimpleArrayFormatter();
     $formatter->init(new ModelCriteria('bookstore', 'Book'));
     $book = $formatter->formatOne($stmt);
     $this->assertNotNull($book);
     $this->assertSame(false, (bool) $book);
 }