Skip to content

Can't acces method in Controller #40

Open
@zahidmuhammadzaki

Description

@zahidmuhammadzaki

I have this function in Welcome Controller

public function format_tanggal($tanggal)
{
 return date('d-m-Y',strtotime($tanggal));
}

But when i write test in WelcomeTest

public function testFormatTanggal(){
        $this->requireController('Welcome');
        $this->CIC = new Welcome();
        $this->assertInstanceOf('CI_Controller', $this->CIC, 'Controller was called correctly');
        $this->assertEquals($this->CIC->format_tanggal('02-05-2015'),'05-02-2015');
}

I get this error

error

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions