Sahih al-Bukhari, Hadith 4699

Narrated Al-Bara bin Azib: Allah's Messenger said, "When a Muslim is questioned in his grave, he will testify that none has the right to be worshipped but Allah and that Muhammad is Allah's Messenger, and that is what is meant by Allah's Statement:-- "Allah will keep firm those who believe with a Word that stands firm in this world and in the Hereafter." (14.27)

حَدَّثَنَا أَبُو الْوَلِيدِ، حَدَّثَنَا شُعْبَةُ، قَالَ أَخْبَرَنِي عَلْقَمَةُ بْنُ مَرْثَدٍ، قَالَ سَمِعْتُ سَعْدَ بْنَ عُبَيْدَةَ، عَنِ الْبَرَاءِ بْنِ عَازِبٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏ الْمُسْلِمُ إِذَا سُئِلَ فِي الْقَبْرِ يَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَأَنَّ مُحَمَّدًا رَسُولُ اللَّهِ، فَذَلِكَ قَوْلُهُ ‏{‏يُثَبِّتُ اللَّهُ الَّذِينَ آمَنُوا بِالْقَوْلِ الثَّابِتِ فِي الْحَيَاةِ الدُّنْيَا وَفِي الآخِرَةِ‏}‏‏"‏

sunnah.com