Tagged Questions
16
votes
2answers
3k views
How do I use PHPUnit with CodeIgniter?
I have read and read article on PHPUnit, SimpleTest and other Unit Testing frameworks. They all sound so great. I finally got PHPUnit working with Codeigniter thanks to ...
3
votes
1answer
429 views
Why is CIUnit needed in order to use PHPUnit with CodeIgniter?
We've decided to use PHPUnit (with Jenkins) in our next project. We're considering different PHP frameworks, one of which is CodeIgniter. I see that a lot of people use My CIUNIT to "bridge" PHPUnit ...
3
votes
1answer
398 views
PHPUnit cannot read Session ( CodeIgniter and CIUnit )
I am using CodeIgniter 1.7.2 and CIUnit v.0.17
I am fairly new to PHPunit so please bear with me on this one. I have set-up phpUnit project extended with CIUnit to test an app built in the ...
2
votes
1answer
468 views
Using YAML Files as data provider in PHPUnit (CIUnit)
I am writing an application using the PHP CodeIgniter Framework. I am trying to test the application using CI_Unit, by extension PHPUnit. To test a model, I am trying to load a YAML data provider as ...
2
votes
1answer
88 views
How can I map a model to a specific controller in CodeIgniter-Simpletest unit test framework?
I am using codeigniter framework and I am using simpletest framework for unit testing my models.
Each model have their own controller.
Most of the url(s) that I use (for webservice response) for ...
2
votes
2answers
1k views
PHPUnit/Xdebug Code Coverage for Codeigniter API Calls
We are using Codeigniter and have 2 options to call our API controllers:
we can use a client that calls the controller's url through Curl,
we can use a client that calls the controller from ...
1
vote
1answer
2k views
Codeigniter PDO integration
i did lot of research on the web but i didnt find anything that could help me to use PDO in codeigniter. I saw in the change lof of CI 2.1.0(i think) that pdo driver was added to the framwork.
I ended ...
1
vote
2answers
120 views
unit testing for downloading a file
First of all i'm using codeigniter as my PHP Framework. Sorry for asking this, i'm trying to grasp the idea of unit testing. They said that its a good practice to do unit testing before developing ...
1
vote
2answers
847 views
Please help me setting up codeigniter and phpunit
I have created few simple apps in codeigniter never tested it. Can anyone give me some links or explain how to setup codeigniter with phpunit ? Many thanks
1
vote
1answer
28 views
Set different Input for Codeigniter My_ciunit Controller testing
i know how to set and execute a controller in order to test it.
See the framework link https://bitbucket.org/kenjis/my-ciunit
But how can i define the given test data Input? Ofcourse i can set ...
1
vote
1answer
593 views
Working with PHPUnit and CodeIgniter 1.7.2
I recently started with the unit testing for my php website made in CodeIgniter 1.7.2. I want to test my web site using PHPUnit.
So I Googled it and came to know that there is a library for ...
0
votes
1answer
111 views
PHPUnit + CodeIgniter multiple objects with same name
I currently test my CodeIgniter app with phpunit by using CIUnit (https://bitbucket.org/kenjis/my-ciunit). The problem is that I have multiple controllers with the same name. I have a controller in ...
0
votes
0answers
22 views
“Trying to get property of non-object File Path…” when testing an extended class using ciunit with codeignition
When I tried to test my Items controller with CIUnit, I have gotten an PHP Error:
[CIUnit] PHP Error: Notice - Trying to get property of non-object File Path: controllers/secure_area.php
I think ...
0
votes
0answers
40 views
Is there a way other than manually creating a CI mock when testing a library for CodeIgniter?
I am attempting to write a few unit tests for IonAuth, and as a first step I would like to test its public API.
Since the library of course uses the CodeIgniter object quite extensively, I need a $ci ...
0
votes
1answer
60 views
Auto genarate testcases for codeigniter
How to genarate testcases for codeigniter or any other MVC based project using the command phpunit-skelgen and I have to create testcases with assertions automatically.
Thank u all.
0
votes
0answers
79 views
How CIunit supports HMVC
I am using HMVC in my codeigniter project because use it help to group my modules together so that code is better organized.
When I integrate CIunit with codeigniter by following kenjis tutorials ...
0
votes
0answers
129 views
CIUnit Testing foostack
Is there anyone here used CIUnit?
Having trouble understanding it. T_T.
What I'm doing is pretty simple
E.g
I have a controller method myphp()
function myphp()
{
echo 'boom';
}
CI Unit ...
0
votes
1answer
418 views
PHPUnit + CodeIgniter on MAMP - Cannot redeclare phpunit_autoload()
I'm trying to configure CodeIgniter with PHPUnit using CIUnit fork from Kenjis: my-ciunit I think I've done a lot more than needed installing PHPUnit :-S it was my first time and possibly I've made ...
0
votes
0answers
197 views
CodeIgniter 1.7 and CIUnit v0.17 wont work
I have followed this link http://www.knollet.com/foostack/ for setting up CIUnitv0.17 in CI project
In the last part of the link is the following :
Without writing any tests, typing “phpunit ...
0
votes
1answer
402 views
Writing Test Cases using Code Igniter
Does anyone know how we can write a test case for Controller/Model using codeigniter. Can anyone please provide a reference link if possible. I am new to test cases using codeigniter. I have checked ...
-1
votes
2answers
43 views
How can I easily unit test with CodeIgniter? [closed]
I want to test my controllers / models with CodeIgniter. How can I accomplish this with CodeIgniter?