fmalk / codeigniter-phpunit

Hack to make CodeIgniter work with PHPUnit.
234 stars 61 forks source link

Fatal error: Call to undefined function assertNotEqual() #20

Closed AlessandroMinoccheri closed 9 years ago

AlessandroMinoccheri commented 9 years ago

Hi, I'm trying to use this assertion:

$this->assertNotEqual('', 'test');

but return me this error:

Fatal error: Call to undefined function assertNotEqual()

I have also tried:

$this->assertNotEquals('', 'test');

But same error.

fmalk commented 9 years ago

Does your test class extends PHPUnit_Framework_TestCase? These are standard functions, so it should just be a problem of you calling them outside their context.

WickedSilver commented 9 years ago

Just for future reference: Try using $this::assertNotEquals

The assert functions are static so they should be callable using the double semicolon.