Skip to content
Permalink
Browse files

Fixing some failing tests

  • Loading branch information...
lorenzo committed Aug 30, 2014
1 parent ce8db85 commit 1a1c48c590f9ef8eee988b2c3a6cce9b04ab14d7
@@ -17,6 +17,7 @@
use Cake\Event\Event;
use Cake\ORM\Behavior;
use Cake\ORM\Entity;
use Cake\ORM\Exception\RecordNotFoundException;
use Cake\ORM\Query;
use Cake\ORM\Table;
@@ -525,7 +526,7 @@ protected function _moveUp($node, $number) {
*
* @param \Cake\ORM\Entity $node The node to move
* @param int|bool $number How many places to move the node or true to move to last position
* @throws \Cake\ORM\Error\RecordNotFoundException When node was not found
* @throws \Cake\ORM\Exception\RecordNotFoundException When node was not found
* @return \Cake\ORM\Entity|bool the entity after being moved or false on failure
*/
public function moveDown(Entity $node, $number = 1) {
@@ -540,7 +541,7 @@ public function moveDown(Entity $node, $number = 1) {
*
* @param \Cake\ORM\Entity $node The node to move
* @param int|bool $number How many places to move the node, or true to move to last position
* @throws \Cake\ORM\Error\RecordNotFoundException When node was not found
* @throws \Cake\ORM\Exception\RecordNotFoundException When node was not found
* @return \Cake\ORM\Entity|bool $node The node after being moved or false on failure
*/
protected function _moveDown($node, $number) {
@@ -601,7 +602,7 @@ protected function _moveDown($node, $number) {
*
* @param mixed $id Record id.
* @return \Cake\ORM\Entity
* @throws \Cake\ORM\Error\RecordNotFoundException When node was not found
* @throws \Cake\ORM\Exception\RecordNotFoundException When node was not found
*/
protected function _getNode($id) {
$config = $this->config();
@@ -614,7 +615,7 @@ protected function _getNode($id) {
->first();
if (!$node) {
throw new \Cake\ORM\Error\RecordNotFoundException("Node \"{$id}\" was not found in the tree.");
throw new RecordNotFoundException("Node \"{$id}\" was not found in the tree.");
}
return $node;
@@ -23,8 +23,8 @@
use Cake\Core\Configure;
use Cake\Core\Exception\MissingPluginException;
use Cake\Core\Plugin;
use Cake\Datasource\Error\MissingDatasourceConfigException;
use Cake\Datasource\Error\MissingDatasourceException;
use Cake\Datasource\Exception\MissingDatasourceConfigException;
use Cake\Datasource\Exception\MissingDatasourceException;
use Cake\Error;
use Cake\Error\ExceptionRenderer;
use Cake\Event\Event;
@@ -33,7 +33,7 @@
use Cake\Network\Exception\NotFoundException;
use Cake\Network\Exception\SocketException;
use Cake\Network\Request;
use Cake\ORM\Error\MissingBehaviorException;
use Cake\ORM\Exception\MissingBehaviorException;
use Cake\Routing\Exception\MissingControllerException;
use Cake\Routing\Router;
use Cake\TestSuite\TestCase;
@@ -164,7 +164,7 @@ public function testFindChildren() {
/**
* Tests that find('children') will throw an exception if the node was not found
*
* @expectedException \Cake\ORM\Error\RecordNotFoundException
* @expectedException \Cake\ORM\Exception\RecordNotFoundException
* @return void
*/
public function testFindChildrenException() {
@@ -115,7 +115,7 @@ public function testBuildOverwritesExistingData() {
/**
* Test build() with a non-existing connection name.
*
* @expectedException Cake\Datasource\Error\MissingDatasourceConfigException
* @expectedException Cake\Datasource\Exception\MissingDatasourceConfigException
* @return void
*/
public function testBuildInvalidConnection() {
@@ -126,7 +126,7 @@ public function testBuildInvalidConnection() {
/**
* Test clear() with an invalid connection name.
*
* @expectedException Cake\Datasource\Error\MissingDatasourceConfigException
* @expectedException Cake\Datasource\Exception\MissingDatasourceConfigException
* @return void
*/
public function testClearInvalidConnection() {

0 comments on commit 1a1c48c

Please sign in to comment.
You can’t perform that action at this time.