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 8228135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:21:43+00:00 2026-06-07T16:21:43+00:00

I’ve configured kohana (3.2) unittest module as described here . So I have: APPPATH/tests/

  • 0

I’ve configured kohana (3.2) unittest module as described here.
So I have:

APPPATH/tests/
    phpunit.xml
    sampletest.php

And last lines index.php file:

require APPPATH.'bootstrap'.EXT;
if ( ! defined('SUPPRESS_REQUEST'))
    Request::factory()->execute()->send_headers();

So the first problem is that in CLI next error appears:

ErrorException [ 8 ]: Undefined index: SERVER_NAME ~ SYSPATH/classes/kohana/url.php [ 79 ]

This happens because of E_STRICT enabled. So when I turn off E_STRICT nothing happens. I mean there’s no output for phpunit in CLI, just empty line.

And the second problem is that web access doesn’t work at all (http://localhost/unittest). 404 error occurs. Maybe I should create some Route or anything?


Mac OS 10.7.4
Apache 1.3.41
PHPUnit 3.6.11
Kohana 3.2.0
  • 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-06-07T16:21:47+00:00Added an answer on June 7, 2026 at 4:21 pm

    Web access doesn’t work because in Kohana versions 3.*, the web interface is no longer present for the unittest module. The only way to run the tests out of the box is to do so via the CLI.

    This can normally be done by doing the following.

    1. Open terminal
    2. change the directory to the tests directory for your application
    3. run ‘phpunit’

    In addition, the tutorial is a bit out of date. A revision to unittest setup in Kohana 3.2 was suggested in: Suppressing the request when running PHPUnit with Kohana 3.2

    Since it is running from the CLI, access to HTTP environment variables are not available.

    Even though they are not available you can set them prior to operation by configuring them in your phpunit.xml file, according to PHPUnit documentation Configuration Appendix:

    Setting PHP INI settings, Constants and Global Variables

    The element and its children can be used to configure PHP settings, constants, and global variables. It can also be used to prepend the include_path.

    <php>
        <includePath>.</includePath>
        <ini name="foo" value="bar"/>
        <const name="foo" value="bar"/>
        <var name="foo" value="bar"/>
        <env name="foo" value="bar"/>
        <post name="foo" value="bar"/>
        <get name="foo" value="bar"/>
        <cookie name="foo" value="bar"/>
        <server name="foo" value="bar"/>
        <files name="foo" value="bar"/>
        <request name="foo" value="bar"/>
    </php>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I would like to count the length of a string with PHP. The string
I have a jquery bug and I've been looking for hours now, I can't
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into

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.