1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
<?php
/**
* Copyright 2007 Maintainable Software, LLC
* Copyright 2008-2014 Horde LLC (http://www.horde.org/)
*
* @author Mike Naberezny <mike@maintainable.com>
* @author Derek DeVries <derek@maintainable.com>
* @author Chuck Hagenbuch <chuck@horde.org>
* @license http://www.horde.org/licenses/bsd
* @category Horde
* @package Db
* @subpackage UnitTests
*/
/**
* @author Mike Naberezny <mike@maintainable.com>
* @author Derek DeVries <derek@maintainable.com>
* @author Chuck Hagenbuch <chuck@horde.org>
* @license http://www.horde.org/licenses/bsd
* @group horde_db
* @category Horde
* @package Db
* @subpackage UnitTests
*/
class Horde_Db_Adapter_Sqlite_ColumnTest extends Horde_Db_Adapter_ColumnBase
{
protected $_class = 'Horde_Db_Adapter_Sqlite_Column';
/*##########################################################################
# Type Cast Values
##########################################################################*/
public function testTypeCastBooleanFalse()
{
$col = new Horde_Db_Adapter_Sqlite_Column('is_active', 'f', 'boolean', false);
$this->assertSame(false, $col->getDefault());
}
public function testTypeCastBooleanTrue()
{
$col = new Horde_Db_Adapter_Sqlite_Column('is_active', 't', 'boolean', false);
$this->assertSame(true, $col->getDefault());
}
}
|