Skip to content

Instantly share code, notes, and snippets.

<?php
echo $this->headLink()->prependStylesheet($this->basePath().'/res/btit-admin/css/main.css')
->prependStylesheet($this->basePath().'/res/vendor/bootstrap/css/bootstrap-responsive.min.css')
->prependStylesheet($this->basePath().'/res/vendor/bootstrap/css/bootstrap.min.css');
?>
class Home_Controller extends Base_Controller {
public function action_index()
{ throw new Exception('pippo');
return View::make('home.index');
}
}
<?php
Route::get('/', function()
{
return View::make('home.index');
});
<phpunit bootstrap="./Bootstrap.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
verbose="true"
stopOnFailure="false"
processIsolation="false"
backupGlobals="false"
syntaxCheck="true"
in the reference
http://framework.zend.com/manual/1.12/en/zend.test.phpunit.html
is:
$this->request->setHeader('X-Requested-With', 'XmlHttpRequest');
it should be:
$this->request->setHeader('X_REQUESTED_WITH', 'XMLHttpRequest');
in Zend_Controller_Request_Http
public function isXmlHttpRequest()
public function xhrsignupAction()
{
$data = array();
$data['code'] = 200;
$request = $this->getRequest();
if ($request->isPost() && $request->isXmlHttpRequest()) {
}
throw new Zend_Controller_Action_Exception('Not Found', 404);
}
public function xhrsignupAction()
{
$data = array();
$data['code'] = 200;
$request = $this->getRequest();
if ($request->isPost() && $request->isXmlHttpRequest()) {
try {
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);
public function testUserCanRegisterAction()
{
$data = array(
'email'=>'ppp@hhh.it',
'password'=>'password',
'repassword'=>'password',
'domain'=>'googlish.com',
'country'=>'it',
'category'=>5,
'terms_accept'=>1,
if ($_SERVER['APPLICATION_ENV'] == 'development') {
error_reporting(-1);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
}