Could anyone make an example? Considering my class below:
class MinhaClasse
{
private $param;
public function __construct($params = []) {
return null;
}
}
I have my test class:
require_once "MinhaClasse.php";
class MinhaClasseTest extends PHPUnit_Framework_TestCase
{
/**
* @dataProvider additionProvider
*/
public function additionProvider()
{
return array(
array('?????', null, null),
array(0, 1, 1),
array(1, 0, 1),
array(1, 1, 3)
);
}
public function testShouldMyClassIsInstantiate($instance, $value, $expected)
{
$this->assertEquals($expected, $value);
}
}