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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:12:42+00:00 2026-05-26T16:12:42+00:00

I do some PHP with Kohana 3 (IDE:Netbeans), and got excited about idea of

  • 0

I do some PHP with Kohana 3 (IDE:Netbeans), and got excited about idea of writing tests for code. It sounds pretty cool thing to do, but i have few complications and worries.

  1. Why using Kohana unittest module in browser is like 5 times faster then running tests in Netbeans or command Line ?

  2. How could i exclude all kohana internal tests? In the PHPUnit .xml configuration file ?

  3. Why when run any test i’ve got in Netbeans panel two entries for it – one with yellow triangle (it says ‘file x skipped’), and entry with normal test result. I do get that double entries for every test, also those native from Kohana. I don’t mind but it’s strange.

  4. All over the Web i see examples, tutorials and screencasts of PHPUnit with sample classes and methods that add two numbers or displays name or do some other trivial things. I’ve learnt to do those kind of assertions, but how could i test my code in Kohana? My Models are 90% ORM stuff. Controllers? How? Any ‘How-tos’ and examples are welcome.

    I’ve seen in Ruby tutorial about Rspec a way to test DB by using testing enviroment Databse and rollbacks after finisning tests. Also user actions like clicking links were simulated. Is it possible with PHPUnit ?

  • 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-26T16:12:42+00:00Added an answer on May 26, 2026 at 4:12 pm

    There always has been a lot of discussion on what has to be tested and what has not to be tested. Generally my opinion is that you shouldn’t test things that should work, like the database driver and connection, this has little to do with your code. Some then argue that you should be able to test it anyway, but in most environment this isn’t an easy thing to do and usually a big hassle.

    Generally controller actions should be tested as well as any helpers or modules you’ve written. Usually one uses the paradigm of a mocking framework to get around the database. The good thing about this is a gigantic speed increase in your testing. There are several PHP mocking frameworks as well I suppose.

    Another great thing to keep in mind is that you also have user testing. This cannot be simulated with the kind of tests you write in kohana. For this it is interesting to look at http://seleniumhq.org/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently writing some php code to convert dates from the Gregorian Calendar to
I have seen hooks in Kohana PHP framework, and they work as some sort
I some php code which gets info from a mysql database. The problem is
I'm refactoring some PHP code and discovered that certain nested combinations of if ()
I have some PHP code that generates dynamic tables of data on the fly.
So I have some PHP code that looks like: $message = 'Here is the
I have some PHP code that is designed to make a spreadsheet with formulas
Quick question about general MVC design principle in PHP, using CodeIgniter or Kohana (I'm
I'm have some php code: <? $cmd=mkfifo /tmp/myfifo;; system($cmd); $cmd=echo 1 > /tmp/myfifo 2>&1
I have some PHP code which looks roughly like this require_once 'cache.php'; require_once 'generator.php';

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.