Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into markup
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Markup/Parser/Textile.php
	library/Zend/Markup/Renderer/AbstractRenderer.php
	library/Zend/Markup/Renderer/Html.php
  • Loading branch information
kokx committed Oct 30, 2010
2 parents d8a7bb7 + 58956c7 commit 390535a
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/Css2Xpath.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
* @subpackage Query
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
class Css2Xpath
{
Expand Down
5 changes: 2 additions & 3 deletions src/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Dom
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand All @@ -33,6 +32,6 @@
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class Exception extends \Zend\Exception
interface Exception
{
}
}
37 changes: 37 additions & 0 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_Dom
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/

/**
* @namespace
*/
namespace Zend\Dom\Exception;

/**
* Zend_Dom Exceptions
*
* @uses \Zend\Dom\Exception
* @category Zend
* @package Zend_Dom
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RuntimeException extends \RuntimeException implements \Zend\Dom\Exception
{
}
1 change: 0 additions & 1 deletion src/NodeList.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
* @subpackage Query
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/
class NodeList implements \Iterator,\Countable
{
Expand Down
7 changes: 3 additions & 4 deletions src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Dom
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down Expand Up @@ -190,7 +189,7 @@ public function execute($query)
public function queryXpath($xpathQuery, $query = null)
{
if (null === ($document = $this->getDocument())) {
throw new Exception('Cannot query; no document registered');
throw new Exception\RuntimeException('Cannot query; no document registered');
}

libxml_use_internal_errors(true);
Expand All @@ -214,7 +213,7 @@ public function queryXpath($xpathQuery, $query = null)
libxml_use_internal_errors(false);

if (!$success) {
throw new Exception(sprintf('Error parsing document (type == %s)', $type));
throw new Exception\RuntimeException(sprintf('Error parsing document (type == %s)', $type));
}

$nodeList = $this->_getNodeList($domDoc, $xpathQuery);
Expand Down Expand Up @@ -248,4 +247,4 @@ protected function _getNodeList($document, $xpathQuery)
$xpathQuery = (string) $xpathQuery;
return $xpath->query($xpathQuery);
}
}
}
1 change: 0 additions & 1 deletion test/Css2XpathTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* @subpackage UnitTests
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion test/NodeListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* @subpackage UnitTests
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
3 changes: 1 addition & 2 deletions test/QueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* @subpackage UnitTests
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down Expand Up @@ -127,7 +126,7 @@ public function testDocumentTypeShouldBeAutomaticallyDiscovered()

public function testQueryingWithoutRegisteringDocumentShouldThrowException()
{
$this->setExpectedException('\\Zend\\Dom\\Exception', 'no document');
$this->setExpectedException('\Zend\Dom\Exception\RuntimeException', 'no document');
$this->query->execute('.foo');
}

Expand Down

0 comments on commit 390535a

Please sign in to comment.