['sender@example.com'], 'to' => 'operator@example.com', 'cc' => '', 'bcc' => '', 'replyto' => '', 'subject' => 'Device is down', 'body' => 'Device is down', 'body_text' => 'Device is down', 'attachments' => [], 'headers' => [], 'html' => true, ]; CactiStubs::willReturn('db_fetch_assoc_prepared', [[ 'id' => 42, 'topic' => 'thold_dhost_mail', 'event_data' => json_encode($event), ]]); process_device_notifications(0, 'all', 0); $source = file_get_contents(dirname(__DIR__, 2) . '/includes/functions.php'); expect(CactiStubs::$mail)->toHaveCount(1) ->and($source)->toContain("hash('sha256', json_encode(") ->not->toContain('md5(json_encode('); });