0
斷言參數列表我想在php單元測試用例如何使用嘲弄
public function getTrack(TrackOption $trackOptions)
{
try {
$buildCondition = array();
$sql = 'SELECT *
FROM xyz tbl'
$where = " WHERE 1";
if ($name) {
$where = " AND tbl.name =".$name;
}
$sql .= $where;
$rsm = new ResultSetMapping();
$query = $this->_rcEm->createNativeQuery($sql, $rsm);
$results = $query->getResult(\Doctrine\ORM\AbstractQuery::HYDRATE_ARRAY);
return $results;
} catch (\Exception $e) {
die($e->getMessage());
}
}
我想斷言$sql
與預期值使用嘲諷斷言和我的預期值的參數值。 任何幫助.........