From ade14ad8c30f81919099eee8be4874937c544b1c Mon Sep 17 00:00:00 2001 From: Chuck Hagenbuch Date: Mon, 28 Sep 2009 15:20:08 -0400 Subject: [PATCH] Fix classname in unit tests. Please run these when changing the Db package! --- .../Horde/Db/Adapter/Mysql/ColumnDefinitionTest.php | 20 ++++++++++---------- .../Db/Adapter/Postgresql/ColumnDefinitionTest.php | 20 ++++++++++---------- .../Horde/Db/Adapter/Sqlite/ColumnDefinitionTest.php | 20 ++++++++++---------- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/framework/Db/test/Horde/Db/Adapter/Mysql/ColumnDefinitionTest.php b/framework/Db/test/Horde/Db/Adapter/Mysql/ColumnDefinitionTest.php index 75aaf5c03..3975b40be 100644 --- a/framework/Db/test/Horde/Db/Adapter/Mysql/ColumnDefinitionTest.php +++ b/framework/Db/test/Horde/Db/Adapter/Mysql/ColumnDefinitionTest.php @@ -38,7 +38,7 @@ class Horde_Db_Adapter_Mysql_ColumnDefinitionTest extends PHPUnit_Framework_Test public function testConstruct() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $this->assertEquals('col_name', $col->getName()); @@ -47,7 +47,7 @@ class Horde_Db_Adapter_Mysql_ColumnDefinitionTest extends PHPUnit_Framework_Test public function testToSql() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $this->assertEquals('`col_name` varchar(255)', $col->toSql()); @@ -55,13 +55,13 @@ class Horde_Db_Adapter_Mysql_ColumnDefinitionTest extends PHPUnit_Framework_Test public function testToSqlLimit() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string', 40 ); $this->assertEquals('`col_name` varchar(40)', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $col->setLimit(40); @@ -70,13 +70,13 @@ class Horde_Db_Adapter_Mysql_ColumnDefinitionTest extends PHPUnit_Framework_Test public function testToSqlPrecisionScale() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'decimal', null, 5, 2 ); $this->assertEquals('`col_name` decimal(5, 2)', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'decimal' ); $col->setPrecision(5); @@ -86,13 +86,13 @@ class Horde_Db_Adapter_Mysql_ColumnDefinitionTest extends PHPUnit_Framework_Test public function testToSqlNotNull() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string', null, null, null, null, false ); $this->assertEquals('`col_name` varchar(255) NOT NULL', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $col->setNull(false); @@ -101,13 +101,13 @@ class Horde_Db_Adapter_Mysql_ColumnDefinitionTest extends PHPUnit_Framework_Test public function testToSqlDefault() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string', null, null, null, 'test', null ); $this->assertEquals("`col_name` varchar(255) DEFAULT 'test'", $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $col->setDefault('test'); diff --git a/framework/Db/test/Horde/Db/Adapter/Postgresql/ColumnDefinitionTest.php b/framework/Db/test/Horde/Db/Adapter/Postgresql/ColumnDefinitionTest.php index e6cef6ce7..64c2854b2 100644 --- a/framework/Db/test/Horde/Db/Adapter/Postgresql/ColumnDefinitionTest.php +++ b/framework/Db/test/Horde/Db/Adapter/Postgresql/ColumnDefinitionTest.php @@ -38,7 +38,7 @@ class Horde_Db_Adapter_Postgresql_ColumnDefinitionTest extends PHPUnit_Framework public function testConstruct() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $this->assertEquals('col_name', $col->getName()); @@ -47,7 +47,7 @@ class Horde_Db_Adapter_Postgresql_ColumnDefinitionTest extends PHPUnit_Framework public function testToSql() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $this->assertEquals('"col_name" character varying(255)', $col->toSql()); @@ -55,13 +55,13 @@ class Horde_Db_Adapter_Postgresql_ColumnDefinitionTest extends PHPUnit_Framework public function testToSqlLimit() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string', 40 ); $this->assertEquals('"col_name" character varying(40)', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $col->setLimit(40); @@ -70,13 +70,13 @@ class Horde_Db_Adapter_Postgresql_ColumnDefinitionTest extends PHPUnit_Framework public function testToSqlPrecisionScale() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'decimal', null, 5, 2 ); $this->assertEquals('"col_name" decimal(5, 2)', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'decimal' ); $col->setPrecision(5); @@ -86,13 +86,13 @@ class Horde_Db_Adapter_Postgresql_ColumnDefinitionTest extends PHPUnit_Framework public function testToSqlNotNull() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string', null, null, null, null, false ); $this->assertEquals('"col_name" character varying(255) NOT NULL', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $col->setNull(false); @@ -101,13 +101,13 @@ class Horde_Db_Adapter_Postgresql_ColumnDefinitionTest extends PHPUnit_Framework public function testToSqlDefault() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string', null, null, null, 'test', null ); $this->assertEquals('"col_name" character varying(255) DEFAULT \'test\'', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $col->setDefault('test'); diff --git a/framework/Db/test/Horde/Db/Adapter/Sqlite/ColumnDefinitionTest.php b/framework/Db/test/Horde/Db/Adapter/Sqlite/ColumnDefinitionTest.php index d465790a0..56f2265e2 100644 --- a/framework/Db/test/Horde/Db/Adapter/Sqlite/ColumnDefinitionTest.php +++ b/framework/Db/test/Horde/Db/Adapter/Sqlite/ColumnDefinitionTest.php @@ -38,7 +38,7 @@ class Horde_Db_Adapter_Sqlite_ColumnDefinitionTest extends PHPUnit_Framework_Tes public function testConstruct() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $this->assertEquals('col_name', $col->getName()); @@ -47,7 +47,7 @@ class Horde_Db_Adapter_Sqlite_ColumnDefinitionTest extends PHPUnit_Framework_Tes public function testToSql() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $this->assertEquals('"col_name" varchar(255)', $col->toSql()); @@ -55,13 +55,13 @@ class Horde_Db_Adapter_Sqlite_ColumnDefinitionTest extends PHPUnit_Framework_Tes public function testToSqlLimit() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string', 40 ); $this->assertEquals('"col_name" varchar(40)', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $col->setLimit(40); @@ -70,13 +70,13 @@ class Horde_Db_Adapter_Sqlite_ColumnDefinitionTest extends PHPUnit_Framework_Tes public function testToSqlPrecisionScale() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'decimal', null, 5, 2 ); $this->assertEquals('"col_name" decimal(5, 2)', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'decimal' ); $col->setPrecision(5); @@ -86,13 +86,13 @@ class Horde_Db_Adapter_Sqlite_ColumnDefinitionTest extends PHPUnit_Framework_Tes public function testToSqlNotNull() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string', null, null, null, null, false ); $this->assertEquals('"col_name" varchar(255) NOT NULL', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $col->setNull(false); @@ -101,13 +101,13 @@ class Horde_Db_Adapter_Sqlite_ColumnDefinitionTest extends PHPUnit_Framework_Tes public function testToSqlDefault() { - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string', null, null, null, 'test', null ); $this->assertEquals('"col_name" varchar(255) DEFAULT \'test\'', $col->toSql()); // set attribute instead - $col = new Horde_Db_Adapter_Abstract_ColumnDefinition( + $col = new Horde_Db_Adapter_Base_ColumnDefinition( $this->_conn, 'col_name', 'string' ); $col->setDefault('test'); -- 2.11.0