* @throws \Exception
*/
public function testModifyQuery() {
- $listener = function(\Symfony\Component\EventDispatcher\Event $e) {
+ /**
+ * @param \Civi\Core\Event\QueryEvent $e
+ */
+ $listener = function($e) {
$e->query = '/* User : hooked */' . $e->query;
};
Civi::dispatcher()->addListener('civi.db.query', $listener);
* Demonstrate it is modified showing the query now breaks.
*/
public function testModifyAndBreakQuery() {
+ /**
+ * @param \Civi\Core\Event\QueryEvent $e
+ */
$listener = function($e) {
$e->query = '/* Forgot trailing comment marker' . $e->query;
};