Witnessing (legally consequential events) and testifying (as to what was witnessed) is a farḍ kifâyah. If there are only two people found who can do so, it is required of them, whether regarding relatives or strangers, if they can both do this without incurring harm. This is due to the statement of Allah, Exalted is He: {O you who have believed, be persistently standing firm in justice, witnesses for Allah, even if it be against yourselves or parents…} (an-Nisâ’ 4:
الْقُضَاةُ ثَلاَثَةٌ وَاحِدٌ فِي الْجَنَّةِ وَاثْنَانِ فِي النَّارِ فَأَمَّا الَّذِي فِي الْجَنَّةِ فَرَجُلٌ عَرَفَ الْحَقَّ فَقَضَى بِهِ وَرَجُلٌ عَرَفَ الْحَقَّتَحَمُّلُ الشَّهَادَةِ وَأَداَؤُهَا فَرْضُ كِفَايَةٍ، إِذَا لَمْ يُوْجَدْ مَنْ يَقُوْمُ بِهَا سِوَى اثْنَيْنِ، لَزِمَهُمَا اْلقِيَامُ بِهَا، عَلىٰ اْلقَرِيْبِ وَاْلبَعِيْدِ، إِذاَ أَمْكَنَهُمَا ذٰلِكَ مِنْ غَيْرِ ضَرَرٍ؛ لِقَوْلِ اللهِ تَعَالىٰ: "يَا أَيُّهَا الَّذِينَ آمَنُوا كُونُوا قَوَّامِينَ بِالْقِسْطِ شُهَدَاءَ لِلَّهِ وَلَوْ عَلَىٰ أَنفُسِكُمْ أَوِ الْوَالِدَيْنِ" [سورة النساء: 135]