Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6721033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:16:55+00:00 2026-05-26T09:16:55+00:00

I am hardly struggling against problem I experience for last two days. In fact

  • 0

I am hardly struggling against problem I experience for last two days.
In fact I can not run test properly and receive:

PHP Fatal error: Call to undefined function Zend_Application() in
C:\xxxxxx\tests\application\controllers\IndexControllerTest.php on
line 10

IndexControllerTest is very simple and looks like this:

require_once 'Zend/Test/PHPUnit/ControllerTestCase.php';


class IndexControllerTest extends Zend_Test_PHPUnit_ControllerTestCase
{

    public function setUp()
    {   
        $this->bootstrap = Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
        parent::setUp();
    }

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

On the other hand bootstrap for tests contains only following code:

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); //   /../application

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)));

require_once 'Zend/Loader/Autoloader.php';
Zend_Loader_Autoloader::getInstance();

Could you please help me with finding a problem? I would like to increase quality of mini project i indend to start but without testing it won’t be possible.

Thank you in advance.


structure

I added directories structure for my project. I keep zend libs in Source Files/library/Zend.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:16:56+00:00Added an answer on May 26, 2026 at 9:16 am

    The error is coming from this:

    $this->bootstrap = Zend_Application(APPLICATION_ENV, APPLICATION_PATH . '/configs/application.ini');
    

    You’re missing a new before Zend_Application.

    But, it’s not clear to me what you have the appBootstrap function for unless you’re going to use it:

    public function setUp()
    {   
        $this->appBootstrap();
        parent::setUp();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem so strange that I hardly can put an adequate title
I hardly see any pointer on the following problem related to Hibernate. This pertains
The title is hardly understandable, but I'm not sure how to summarize that another
I am new on iphone development and I have problem with CoreData. I hardly
Hardly can I find any good material on Poco C++. Their documentation cannot replace
I hardly have any idea how to proceed when deleting. My problem is that
So infuriating, I can hardly talk. I've assembled an RSS feed with SimpleXML and
I'm by far no JS developer (in fact, hardly developer at all :) but
I have been struggling to create a django form which users can fill and
I'm sorry for the vague title, but what I want to do can hardly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.