Welcome Guest, Not a member yet? Register   Sign In
Integrating Codeception testing
#1

Does anyone else here use Codeception for their tests with CodeIgniter? I'm hoping to get new ideas about ways to integrate it with CodeIgniter that I haven't thought of yet. And since no one seems to write blog posts about these two out there, I thought I'd ask all of you!

I have it working, but it feels like a hack, and always has. There's also a nagging suspicion in the back of my mind that "I'm doing it all wrong" for this, but I guess that's normal. Always should feel like a clean integration or it bugs us, right?

Please feel free to throw out any ideas related to this here so that we can all benefit from it.
Reply
#2

(04-20-2015, 10:01 PM)kilishan Wrote: Does anyone else here use Codeception for their tests with CodeIgniter? I'm hoping to get new ideas about ways to integrate it with CodeIgniter that I haven't thought of yet. And since no one seems to write blog posts about these two out there, I thought I'd ask all of you!

I have it working, but it feels like a hack, and always has. There's also a nagging suspicion in the back of my mind that "I'm doing it all wrong" for this, but I guess that's normal. Always should feel like a clean integration or it bugs us, right?

Please feel free to throw out any ideas related to this here so that we can all benefit from it.

I'm starting to try to do this as well. Currently running into issues with helpers and such not loading correctly
Reply
#3

How do you get around the issue with helpers when running the test? I keep getting the following errors when I run them via codeception...

Code:
PHP Fatal error:  Call to a member function is_mobile() on a non-object in /var/www/dev/application/helpers/MY_html_helper.php on line 58



<? function select_image($trigger, $target) { ?>
    <? $target = str_replace('#', '', $target) ?>
    <a href="/photo_selector?target_id=
A PHP Error was encountered

Severity: NoticeMessage:  Undefined variable: targetFilename: /var/www/dev/application/helpers/image_helper.phpLine Number: 3
Reply
#4

As long as helpers are loaded, they should work just fine. Looks like your using custom helper files so I can't comment on why those errors are coming up, but it sounds like they haven't been defined in the right place, instead of an issue with the testing.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB