Buongiorno a tutti e grazie per aver risposto.
Utilizzo il costruttore in questo modo:
Codice PHP:
include("phpunit.php");
require("class.phpmailer.php");
error_reporting(E_ALL);
$myVar = array( "nomeFile"=>$nomeFile, "dirFile"=>$dirFile, "emailAddr"=>$emailAddr, "codMod"=>$codMod);
class phpmailerTest extends TestCase{
private $myarray;
public function __construct($myarray) {
$this->myarray = $myarray;
}
}
Questo è l'errore:
Codice PHP:
Fatal error: Method name must be a string in /phpmailer/phpunit.php on line 129
function runTest() {
$name = $this->name();//line 129
// Since isset($this->$name) is false, no way to run defensive checks
$this->$name();
}
Questo è quanto.