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


Messages In This Thread
Unit test failing, Error: Call to undefined method CodeIgniter\AjaxControllerTest::co - by manochaaa - 07-02-2021, 06:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB