Add the flour, cocoa, icing sugar, and butter to a food processor and blend until the mixture resembles breadcrumbs (don’t worry if some larger bits of butter remain).
Add the egg yolk and process until a dough forms.
If needed, add a little cold water—start with a tablespoon—just until the dough comes together. You’re aiming for a consistency that’s not too sticky or too dry (see note 3).
Form the dough into a ball and wrap in clingfilm.
Chill in the fridge for around 30–60 minutes.
Preheat the oven to 200°C (400℉).
On a floured surface, roll out the dough into a large circle, then transfer to a baking tin or pie dish (see note 4).
Trim the edges, then line the pastry with foil or baking paper and fill with baking beans (or dried peas).
Blind bake for 15 minutes.
Remove the foil and beans, then bake for a further 5 minutes.
Remove from the oven and reduce the temperature to 175°C (350℉).
Allow the crust to cool. You can leave it overnight if preferred—or freeze the pastry case for another time.