Browse Source

Utility\Error -> Utility\Exception

Jose Lorenzo Rodriguez 11 years ago
parent
commit
95aa41f278
3 changed files with 11 additions and 11 deletions
  1. 1 1
      src/Utility/Error/XmlException.php
  2. 7 7
      src/Utility/Xml.php
  3. 3 3
      tests/TestCase/Utility/XmlTest.php

+ 1 - 1
src/Utility/Error/XmlException.php

@@ -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;
 

+ 7 - 7
src/Utility/Xml.php

@@ -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;
 
@@ -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(
@@ -119,7 +119,7 @@ class Xml {
  * @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');
@@ -183,7 +183,7 @@ class Xml {
  * @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')) {
@@ -230,7 +230,7 @@ class Xml {
  * @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)) {
@@ -335,7 +335,7 @@ class Xml {
  *
  * @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) {

+ 3 - 3
tests/TestCase/Utility/XmlTest.php

@@ -18,7 +18,7 @@ use Cake\Collection\Collection;
 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;
 
 /**
@@ -178,7 +178,7 @@ class XmlTest extends TestCase {
 /**
  * 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() {
@@ -1102,7 +1102,7 @@ XML;
  * testToArrayFail method
  *
  * @dataProvider invalidToArrayDataProvider
- * @expectedException \Cake\Utility\Error\XmlException
+ * @expectedException \Cake\Utility\Exception\XmlException
  * @return void
  */
 	public function testToArrayFail($value) {