Skip to content

Commit

Permalink
Utility\Error -> Utility\Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Aug 30, 2014
1 parent 1a1c48c commit 95aa41f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Expand Up @@ -11,7 +11,7 @@
* @since 3.0.0
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
namespace Cake\Utility\Error;
namespace Cake\Utility\Exception;

use RuntimeException;

Expand Down
14 changes: 7 additions & 7 deletions src/Utility/Xml.php
Expand Up @@ -15,8 +15,8 @@
namespace Cake\Utility;

use Cake\Core\Configure;
use Cake\Network\Error\SocketException;
use Cake\Utility\Error\XmlException;
use Cake\Network\Exception\SocketException;
use Cake\Utility\Exception\XmlException;
use Cake\Network\Http\Client;
use \DOMDocument;

Expand Down Expand Up @@ -81,7 +81,7 @@ class Xml {
* @param string|array $input XML string, a path to a file, a URL or an array
* @param string|array $options The options to use
* @return \SimpleXMLElement|\DOMDocument SimpleXMLElement or DOMDocument
* @throws \Cake\Utility\Error\XmlException
* @throws \Cake\Utility\Exception\XmlException
*/
public static function build($input, array $options = []) {
$defaults = array(
Expand Down Expand Up @@ -119,7 +119,7 @@ public static function build($input, array $options = []) {
* @param string $input The input to load.
* @param array $options The options to use. See Xml::build()
* @return \SimpleXmlElement|\DOMDocument
* @throws \Cake\Utility\Error\XmlException
* @throws \Cake\Utility\Exception\XmlException
*/
protected static function _loadXml($input, $options) {
$hasDisable = function_exists('libxml_disable_entity_loader');
Expand Down Expand Up @@ -183,7 +183,7 @@ protected static function _loadXml($input, $options) {
* @param array|\Cake\Collection\Collection $input Array with data or a collection instance.
* @param string|array $options The options to use
* @return \SimpleXMLElement|\DOMDocument SimpleXMLElement or DOMDocument
* @throws \Cake\Utility\Error\XmlException
* @throws \Cake\Utility\Exception\XmlException
*/
public static function fromArray($input, $options = array()) {
if (method_exists($input, 'toArray')) {
Expand Down Expand Up @@ -230,7 +230,7 @@ public static function fromArray($input, $options = array()) {
* @param array &$data Array of data to append to the $node.
* @param string $format Either 'attribute' or 'tags'. This determines where nested keys go.
* @return void
* @throws \Cake\Utility\Error\XmlException
* @throws \Cake\Utility\Exception\XmlException
*/
protected static function _fromArray($dom, $node, &$data, $format) {
if (empty($data) || !is_array($data)) {
Expand Down Expand Up @@ -335,7 +335,7 @@ protected static function _createChild($data) {
*
* @param \SimpleXMLElement|\DOMDocument|\DOMNode $obj SimpleXMLElement, DOMDocument or DOMNode instance
* @return array Array representation of the XML structure.
* @throws \Cake\Utility\Error\XmlException
* @throws \Cake\Utility\Exception\XmlException
*/
public static function toArray($obj) {
if ($obj instanceof \DOMNode) {
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/Utility/XmlTest.php
Expand Up @@ -18,7 +18,7 @@
use Cake\Core\Configure;
use Cake\ORM\Entity;
use Cake\TestSuite\TestCase;
use Cake\Utility\Error\XmlException;
use Cake\Utility\Exception\XmlException;
use Cake\Utility\Xml;

/**
Expand Down Expand Up @@ -178,7 +178,7 @@ public function testBuildInvalidData($value) {
/**
* Test that building SimpleXmlElement with invalid XML causes the right exception.
*
* @expectedException \Cake\Utility\Error\XmlException
* @expectedException \Cake\Utility\Exception\XmlException
* @return void
*/
public function testBuildInvalidDataSimpleXml() {
Expand Down Expand Up @@ -1102,7 +1102,7 @@ public static function invalidToArrayDataProvider() {
* testToArrayFail method
*
* @dataProvider invalidToArrayDataProvider
* @expectedException \Cake\Utility\Error\XmlException
* @expectedException \Cake\Utility\Exception\XmlException
* @return void
*/
public function testToArrayFail($value) {
Expand Down

0 comments on commit 95aa41f

Please sign in to comment.