Commit ddca18a1 authored by zYne's avatar zYne

Removed InvalidKeyException references from Doctrine_Table

parent 70f76a83
...@@ -423,7 +423,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { ...@@ -423,7 +423,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
} }
break; break;
endswitch; endswitch;
} catch(InvalidKeyException $e) { } catch(Doctrine_Table_Exception $e) {
} }
} }
...@@ -445,7 +445,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { ...@@ -445,7 +445,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
*/ */
final public function getBound($name) { final public function getBound($name) {
if( ! isset($this->bound[$name])) if( ! isset($this->bound[$name]))
throw new InvalidKeyException('Unknown bound '.$name); throw new Doctrine_Table_Exception('Unknown bound '.$name);
return $this->bound[$name]; return $this->bound[$name];
} }
...@@ -461,7 +461,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { ...@@ -461,7 +461,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
return $this->bound[$k]; 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 * returns the alias for given component name
...@@ -485,7 +485,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { ...@@ -485,7 +485,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
if($name = array_search($this->boundAliases,$alias)) if($name = array_search($this->boundAliases,$alias))
return $name; return $name;
throw new InvalidKeyException('Unknown alias '.$alias); throw new Doctrine_Table_Exception('Unknown alias '.$alias);
} }
/** /**
* unbinds all relations * unbinds all relations
...@@ -527,7 +527,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { ...@@ -527,7 +527,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
*/ */
final public function bind($name,$field,$type,$localKey) { final public function bind($name,$field,$type,$localKey) {
if(isset($this->relations[$name])) 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); $e = explode(" as ",$name);
$name = $e[0]; $name = $e[0];
...@@ -635,7 +635,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable { ...@@ -635,7 +635,7 @@ class Doctrine_Table extends Doctrine_Configurable implements Countable {
try { try {
$bound = $table->getBoundForName($class); $bound = $table->getBoundForName($class);
break; break;
} catch(InvalidKeyException $exc) { } } catch(Doctrine_Table_Exception $exc) { }
} }
if( ! isset($local)) if( ! isset($local))
......
<?php <?php
ob_start(); ob_start();
require_once("ConfigurableTestCase.php"); require_once("ConfigurableTestCase.php");
require_once("ManagerTestCase.php"); require_once("ManagerTestCase.php");
require_once("ConnectionTestCase.php"); require_once("ConnectionTestCase.php");
...@@ -37,7 +38,7 @@ error_reporting(E_ALL); ...@@ -37,7 +38,7 @@ error_reporting(E_ALL);
$test = new GroupTest("Doctrine Framework Unit Tests"); $test = new GroupTest("Doctrine Framework Unit Tests");
//$test->addTestCase(new Doctrine_DB_TestCase()); $test->addTestCase(new Doctrine_DB_TestCase());
$test->addTestCase(new Doctrine_ConnectionTestCase()); $test->addTestCase(new Doctrine_ConnectionTestCase());
...@@ -81,15 +82,15 @@ $test->addTestCase(new Doctrine_ImportTestCase()); ...@@ -81,15 +82,15 @@ $test->addTestCase(new Doctrine_ImportTestCase());
$test->addTestCase(new Doctrine_CollectionTestCase()); $test->addTestCase(new Doctrine_CollectionTestCase());
$test->addTestCase(new Doctrine_QueryTestCase());
$test->addTestCase(new Doctrine_Query_ReferenceModel_TestCase()); $test->addTestCase(new Doctrine_Query_ReferenceModel_TestCase());
$test->addTestCase(new Doctrine_BooleanTestCase()); $test->addTestCase(new Doctrine_BooleanTestCase());
$test->addTestCase(new Doctrine_QueryTestCase());
$test->addTestCase(new Doctrine_EnumTestCase()); $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_FileTestCase());
//$test->addTestCase(new Doctrine_Cache_SqliteTestCase()); //$test->addTestCase(new Doctrine_Cache_SqliteTestCase());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment