For the rocket pesto, place all the pesto ingredients into a small food processor and blend until smooth.
For the mushrooms, place the vegetable oil into a deep, heavy-bottomed saucepan and heat until a small cube of bread sizzles and turns golden when dropped into it. (CAUTION: hot oil can be dangerous. Do not leave unattended.)
Place a teaspoon of the rocket pesto into the cap of each mushroom. You will have some left over.
Lay half of the filo squares out on a flat surface and brush the edges of each square with beaten egg. Place a stuffed mushroom into the middle of each square and scrunch together around the edges to seal, brushing with more beaten egg.
With the remaining filo squares, wrap each mushroom in another piece of pastry brushed with beaten egg.
Carefully place the wrapped mushrooms into the hot oil and deep fry for 4-5 minutes, or until golden-brown. Remove from the oil with a slotted spoon and drain on kitchen paper.
To serve, place the mushrooms onto a serving plate and drizzle over the remaining rocket pesto.