Welcome Guest, Not a member yet? Register   Sign In
Unit test failing, Error: Call to undefined method CodeIgniter\AjaxControllerTest::co
#1

Code:
<?php

namespace CodeIgniter;
use CodeIgniter\Test\CIUnitTestCase;

class AjaxControllerTest extends CIUnitTestCase
{

  public function testAjax()
  {
    $result = $this->controller(\App\Controllers\Ajax::class)->execute('getFormData');
    $this->assertTrue($result->isOK());
  }

}
?>

This is the source for my test case, I've followed the tutorial from the CI4 website. What am I doing wrong here? I've tried including the ControllerTestTrait with no luck.
Reply
#2

Read:
Test cases for an application which has both php and javascript
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

Thanks for the reply, but this doesn't really help.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB