oks
oks

Reputation: 314

Phpunit newbie - how to get assertTrue method

How do I get assertTrue method? My file phpunit_test.php is

<?php

class phptest extends PHPUnit_Framework_TestCase
{
  public function test_something()
  {
    $this->assertTrue{ 1 > 0 };
  }  
}
?>

but phpunit phpunit_test.php returns

There was 1 error:

1) phptest::test_something
Undefined property: phptest::$assertTrue

Upvotes: 2

Views: 1283

Answers (1)

Nanne
Nanne

Reputation: 64429

 $this->assertTrue{ 1 > 0 };

should be

 $this->assertTrue( 1 > 0 );

Upvotes: 4

Related Questions