Giter Site home page Giter Site logo

codeigniter-simpletest's Introduction

codeigniter-simpletest's People

Contributors

chonthu avatar ericlbarnes avatar flashover avatar hfunai avatar jason-cooke avatar joetsuihk avatar kstep avatar slivero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

codeigniter-simpletest's Issues

The action you have requested is not allowed.

Not sure whether I'm doing this right, but when I go to /unit_test.php and run any test, it throws this error

"The action you have requested is not allowed."

I'm running CI 2.0.2

Isolated view test

Is there a decent way to test views in isolation (ie without invoking controllers/models, just setting up some variables) using simple_test?

View test example

Well done!
I was really looking for something like this package!

A was wondering how do you handle the view test.
Using simpletest I solve the issue with a combination of:

$this->get('http://localhost/....../mypage.php');

$this->click('My link to click');

$this->assertText('Text to check');

Is that a correct approach?
What's the correct way using your package?

Improve documentation

This library would be a lot more useful if some real-world documentation were included -- this should include basic installation scenarios (e.g. is it even possible to put the test files in a directory outside of document root? All my CodeIgniter files save for index.php are not in the docroot, but I see nothing in the comments or README that let me know if this was written in a way that respects that common scenario).

Here are a few examples:

  • from unit_test.php, What is this?:
    define('MAIN_PATH', realpath(dirname(FILE)).'/');
  • Please put a link back to http://www.simpletest.org/ prominently in your docs -- it's not clear from the de
  • From the README, this is useless: "All test files need to be named test_name_folder.php." -- you give example of the filename, but no explanation of where they're supposed to go. What directory?
  • Please explain your directory structure. I'm used to putting all my tests into one folder. Why would I put some into a folder named "bugs" and others in a folder named "libraries" etc.
  • Update your unit_test.php file so it's clear what areas should NOT be edited. Usually there's a note like "DO NOT EDIT BELOW THIS LINE."
  • Add at least one wiki page please: something that describes the project -- it's not even clear that this is an implementation of http://www.simpletest.org/ (include a link please)

With mediocre documentation, a project can never be more than mediocre.

true test but full of exceptions

Here is my simple controller test. It works perfectly, but it throws lots of exceptions.

class test_user_controller extends CodeIgniterWebTestCase
{
function __construct()
{
parent::__construct();
$this->WebTestCase('User Controller');
}

function testHomePage() {
$this->get('http://localhost/hekmat/');
$this->assertText('Main Page');
}
}

exceptions:
Exception: D:\wamp\www\Hekmat/tests/controllers/test_users_controller.php -> User Controller -> testHomePage -> Unexpected PHP error [Function split() is deprecated] severity [E_DEPRECATED] in [D:\wamp\www\Hekmat\tests\simpletest\url.php line 188]
Exception: D:\wamp\www\Hekmat/tests/controllers/test_users_controller.php -> User Controller -> testHomePage -> Unexpected PHP error [Function split() is deprecated] severity [E_DEPRECATED] in [D:\wamp\www\Hekmat\tests\simpletest\http.php line 524]
Exception: D:\wamp\www\Hekmat/tests/controllers/test_users_controller.php -> User Controller -> testHomePage -> Unexpected PHP error [Function split() is deprecated] severity [E_DEPRECATED] in [D:\wamp\www\Hekmat\tests\simpletest\http.php line 319]
Exception: D:\wamp\www\Hekmat/tests/controllers/test_users_controller.php -> User Controller -> testHomePage -> Unexpected PHP error [Function split() is deprecated] severity [E_DEPRECATED] in [D:\wamp\www\Hekmat\tests\simpletest\http.php line 460]
Exception: D:\wamp\www\Hekmat/tests/controllers/test_users_controller.php -> User Controller -> testHomePage -> Unexpected PHP error [Function split() is deprecated] severity [E_DEPRECATED] in [D:\wamp\www\Hekmat\tests\simpletest\url.php line 188]
Exception: D:\wamp\www\Hekmat/tests/controllers/test_users_controller.php -> User Controller -> testHomePage -> Unexpected PHP error [Function split() is deprecated] severity [E_DEPRECATED] in [D:\wamp\www\Hekmat\tests\simpletest\url.php line 188]

Suggest: Selenium

Add support for Selenium; PHPUnit has it yet i think its over-complicate with PHPUnit....

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.