Skip to content

Commit

Permalink
broken project
Browse files Browse the repository at this point in the history
  • Loading branch information
stfalcon committed Dec 3, 2010
1 parent 4e40694 commit 8e30d64
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
11 changes: 10 additions & 1 deletion application/controllers/ErrorController.php
Expand Up @@ -18,7 +18,7 @@ public function errorAction()
case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:

// 404 error -- controller or action not found
$this->getResponse()->setHttpResponseCode(404);
// $this->getResponse()->setHttpResponseCode(404);
$this->view->message = 'Page not found';
break;
default:
Expand Down Expand Up @@ -51,6 +51,15 @@ public function getLog()
return $log;
}

public function getLog()
{
$bootstrap = $this->getInvokeArg('bootstrap');
if (!$bootstrap->hasResource('Log')) {
return false;
}
$log = $bootstrap->getResource('Log');
return $log;
}

}

1 change: 0 additions & 1 deletion application/controllers/IndexController.php
Expand Up @@ -13,6 +13,5 @@ public function indexAction()
// action body
}


}

2 changes: 1 addition & 1 deletion build.xml
Expand Up @@ -19,7 +19,7 @@

<!-- PHP copy/paste analysis -->
<target name="phpcpd">
<phpcpd>
<phpcpd minLines="2" minTokens="20">
<fileset dir="${sourcedir}" id="filestocpd">
<include name="**/*.php"/>
</fileset>
Expand Down
10 changes: 9 additions & 1 deletion tests/application/ControllerTestCase.php
Expand Up @@ -7,13 +7,21 @@

abstract class ControllerTestCase extends Zend_Test_PHPUnit_ControllerTestCase
{

public function setUp()
{
$this->bootstrap = array($this, 'appBootstrap');
parent::setUp();
}

public function appBootstrap()
{
$this->bootstrap = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/configs/application.ini'
);

parent::setUp();
$this->bootstrap->bootstrap();
}

}
4 changes: 2 additions & 2 deletions tests/application/controllers/IndexControllerTest.php
Expand Up @@ -10,5 +10,5 @@ public function testIndexAction()
$this->assertModule('default');
$this->assertController('index');
$this->assertAction('index');
}
}
}
}

0 comments on commit 8e30d64

Please sign in to comment.