TypeError: Argument 1 passed to Drupal\views\Plugin\views\HandlerBase::__construct() must be of the type array phpunit
My code is:
use Drupal\views_simple_math_field\Plugin\views\field\SimpleMathField;
class BasicTest extends PHPUnit_Framework_TestCase
{
public function test_proba()
{
$first = 25;
$second = 5;
$result = 13;
$test = new SimpleMathField();
$working = $test->plus($first,$second,$result);
$this->assertEquals($result,$working);
}
}
I think the error is within " $test = new SimpleMathField();". The test works when I exclude SimpleMathField
Aucun commentaire:
Enregistrer un commentaire