Dice the chicken breasts, and season them with salt and pepper.
Heat up one tablespoon of oil in a large pan, and lightly brown the chicken pieces, then remove from the pan and set aside.
In the same pan, add the remaining oil and butter, and fry the onions until golden.
Add the mushrooms and garlic, and fry until all the moisture is released and they have a light brown colour.
Add the chicken pieces back to the pan, pour over the chicken stock, milk and spinach.
In a bowl, combine cornflour with 2-3 tablespoons of cold water to get a lump-free mixture, and pour it over the chicken filling, then stir until the liquid in the pan thickens into a sauce.
Season well with salt and pepper, remove from the heat and leave to cool completely.
Preheat the oven to 200 degrees Celsius (390 Fahrenheit).
Transfer the chicken mixture to an oven-proof dish, then brush the edges of the pan with beaten egg.
Roll over the puff pastry, removing the excess pastry from around the dish.
Brush the top with egg and bake for about 20 minutes or until the pastry is golden brown.