Example #1
0
 public function testAddTableWithDecimals()
 {
     $e = null;
     try {
         $this->_conn->selectValues("SELECT * FROM big_numbers");
     } catch (Exception $e) {
     }
     $this->assertInstanceOf('Horde_Db_Exception', $e);
     $m = new GiveMeBigNumbers();
     $m->up();
     $result = BigNumber::create(array('bank_balance' => '1586.43', 'big_bank_balance' => "1000234000567.95", 'world_population' => '6000000000', 'my_house_population' => '3', 'value_of_e' => "2.7182818284590452353602875"));
     $this->assertInstanceOf('BigNumber', $result);
     $b = BigNumber::find('first');
     $this->assertNotNull($b->bank_balance);
     $this->assertNotNull($b->big_bank_balance);
     $this->assertNotNull($b->world_population);
     $this->assertNotNull($b->my_house_population);
     $this->assertNotNull($b->value_of_e);
     $m->down();
     $e = null;
     try {
         $this->_conn->selectValues("SELECT * FROM big_numbers");
     } catch (Exception $e) {
     }
     $this->assertInstanceOf('Horde_Db_Exception', $e);
 }