Ciao, sono nuovo di Zend Framework 2 e sto riscontrando un problema con questa riga di codice:
$sql = new Sql($this->tableGateway->getAdapter());
Se provo questo usando Phpunit ottengo l'errore
Argument 1 passed to ZendDbSqlSql::__construct() must implement interface
ZendDbAdapterAdapterInterface, null given, called in C:xampphtdocszend2
risposte:
0 per risposta № 1Controlla se l'adattatore è impostato.
var_dump(get_class($this->tableGateway->getAdapter()));
Anche tu come dichiari $this->tableGateway
?