I am getting the following error in my PHPunit test
Warning: Invalid callback Vc_Manager::__sleep, cannot access private method Vc_Manager::__sleep()
This is caused because the function __sleep() is private and the __contruct() function for the class is also private.
How can I using this function in my phpunit testing without turning the function public?
Full code:
require_once('../splitTestNew.php');
class SplitTestTest extends PHPUnit_Framework_TestCase
{
public function setUp(){
}
public function tearDown(){ }
/**
* @runInSeparateProcess
*/
public function testDefaultParameterValues()
{
$obj = new BSSplitTest();
$this->assertTrue($obj->params['A'] == 50);
$this->assertTrue($obj->params['B'] == 50);
$this->assertTrue($obj->params['SplitCookieA'] == 'ACounter');
$this->assertTrue($obj->params['SplitCookieB'] == 'BCounter');
$this->assertTrue($obj->params['TableA'] == 'counter_a');
$this->assertTrue($obj->params['TableB'] == 'counter_b');
}