Skip to content

Commit

Permalink
Case and name resolution fixes
Browse files Browse the repository at this point in the history
- Updated sitemap test to use HTTP instead of Http
- Fixed JSON helper to alias Layout to LayoutManager
  • Loading branch information
weierophinney committed Jun 16, 2010
1 parent dfc035b commit 7ae9686
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions library/Zend/View/Helper/JSON.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @namespace
*/
namespace Zend\View\Helper;
use Zend\Layout;
use Zend\Layout\Layout as LayoutManager;

/**
* Helper for simplifying JSON responses
Expand Down Expand Up @@ -71,8 +71,8 @@ public function direct($data = null, $keepLayouts = false)

$data = \Zend\JSON\JSON::encode($data, null, $options);
if (!$keepLayouts) {
$layout = Layout\Layout::getMvcInstance();
if ($layout instanceof Layout\Layout) {
$layout = LayoutManager::getMvcInstance();
if ($layout instanceof LayoutManager) {
$layout->disableLayout();
}
}
Expand Down
4 changes: 2 additions & 2 deletions tests/Zend/View/Helper/Navigation/SitemapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ protected function setUp()
$this->_oldRouter = $this->_front->getRouter();

$this->_front->resetInstance();
$this->_front->setRequest(new Request\Http());
$this->_front->setRequest(new Request\HTTP());
$this->_front->getRouter()->addDefaultRoutes();

parent::setUp();
Expand All @@ -97,7 +97,7 @@ protected function tearDown()
if (null !== $this->_oldRequest) {
$this->_front->setRequest($this->_oldRequest);
} else {
$this->_front->setRequest(new Request\Http());
$this->_front->setRequest(new Request\HTTP());
}
$this->_front->setRouter($this->_oldRouter);

Expand Down

0 comments on commit 7ae9686

Please sign in to comment.