How can I pass data to a phpunit test method?

Viewed 1556

I am writing phpunit test case method which accept a parameter.

My code is as follows

class myTestCase extends PHPUnit_Framework_TestCase
{
    public function testMyCase($date){

        $resultSet=$this->query("select * from testCase where date='$date'");
        $this->assertTrue($resultSet,True);
    }
}

I am trying to run above test case from linux terminal.

phpunit --filter testMyCase myTestCase.php

But do not know how to pass parameter. Please help.

Thank you.

3 Answers
Related