From ddca18a141ef5793a3d2d6ea5278cfa956ba7aa2 Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 24 Sep 2006 12:55:25 +0000 Subject: [PATCH] Removed InvalidKeyException references from Doctrine_Table --- Doctrine/Table.php | 12 ++++++------ tests/run.php | 9 +++++---- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Doctrine/Table.php b/Doctrine/Table.php index 90939105e..5153f5f99 100644 --- a/Doctrine/Table.php +++ b/Doctrine/Table.php @@ -423,7 +423,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { } break; endswitch; - } catch(InvalidKeyException $e) { + } catch(Doctrine_Table_Exception $e) { } } @@ -445,7 +445,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { */ final public function getBound($name) { if( ! isset($this->bound[$name])) - throw new InvalidKeyException('Unknown bound '.$name); + throw new Doctrine_Table_Exception('Unknown bound '.$name); return $this->bound[$name]; } @@ -461,7 +461,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { return $this->bound[$k]; } } - throw new InvalidKeyException('Unknown bound '.$name); + throw new Doctrine_Table_Exception('Unknown bound '.$name); } /** * returns the alias for given component name @@ -485,7 +485,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { if($name = array_search($this->boundAliases,$alias)) return $name; - throw new InvalidKeyException('Unknown alias '.$alias); + throw new Doctrine_Table_Exception('Unknown alias '.$alias); } /** * unbinds all relations @@ -527,7 +527,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { */ final public function bind($name,$field,$type,$localKey) { if(isset($this->relations[$name])) - throw new InvalidKeyException('Relation already set for '.$name); + throw new Doctrine_Table_Exception('Relation already set for '.$name); $e = explode(" as ",$name); $name = $e[0]; @@ -635,7 +635,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { try { $bound = $table->getBoundForName($class); break; - } catch(InvalidKeyException $exc) { } + } catch(Doctrine_Table_Exception $exc) { } } if( ! isset($local)) diff --git a/tests/run.php b/tests/run.php index b09702da4..20f456fbb 100644 --- a/tests/run.php +++ b/tests/run.php @@ -1,6 +1,7 @@ addTestCase(new Doctrine_DB_TestCase()); +$test->addTestCase(new Doctrine_DB_TestCase()); $test->addTestCase(new Doctrine_ConnectionTestCase()); @@ -81,15 +82,15 @@ $test->addTestCase(new Doctrine_ImportTestCase()); $test->addTestCase(new Doctrine_CollectionTestCase()); -$test->addTestCase(new Doctrine_QueryTestCase()); - $test->addTestCase(new Doctrine_Query_ReferenceModel_TestCase()); $test->addTestCase(new Doctrine_BooleanTestCase()); +$test->addTestCase(new Doctrine_QueryTestCase()); + $test->addTestCase(new Doctrine_EnumTestCase()); -$test->addTestCase(new Doctrine_RelationAccessTestCase()); +//$test->addTestCase(new Doctrine_RelationAccessTestCase()); //$test->addTestCase(new Doctrine_Cache_FileTestCase()); //$test->addTestCase(new Doctrine_Cache_SqliteTestCase());