To make chocolate pastry, put flour, cocoa, sugar and butter in the bowl of a food processor and process until mixture forms breadcrumbs. Add water and egg yolk, then process until mixture forms a dough ball. Knead on a lightly floured surface until smooth. Flatten pastry into a disc and enclose in plastic wrap. Refrigerate for 30 minutes.
Roll pastry out between 2 sheets of baking paper until 3mm thick and large enough to line a 28cm quiche tin with removable base. Carefully peel top layer of baking paper off pastry. Invert pastry into tin, using paper to help keep pastry in 1 piece. Gently fit into sides of tin, carefully peel away remaining paper and press into edges. Trim excess pastry. Press into fluted edges so pastry rises slightly above rim to allow for shrinkage.
Put pastry case in freezer for 30 minutes. Preheat oven to 200°C. Line pastry with baking paper. Fill with baking beans or rice and bake for 15 minutes. Remove paper and baking beans, reduce oven temperature to 180°C and bake for a further 15 minutes. Remove from oven. Cool slightly.
Reduce oven temperature to 160°C. To make chocolate filling, break chocolate into a heatproof bowl, add butter. Heat cream in a small saucepan over a medium-low heat until simmering. Pour cream over chocolate and butter, then stir until melted and smooth. Allow to cool slightly, then stir in eggs and egg yolks until smooth. Put pastry case tin on an oven tray. Pour chocolate filling into case. Bake for 25-30 minutes or until set and doesn’t wobble too much in the centre. Allow to cool completely.
To make chocolate glaze, break chocolate into a heatproof bowl. Heat cream in a small saucepan over a medium-low heat until simmering. Pour cream over chocolate. Stir until melted and smooth. Add corn syrup and stir until combined (this will give it a lovely gloss). Pour evenly over the top of tart and allow to set for 1-2 hours before serving.