Preheat the oven to 400°F.
Place the onion and mushrooms in a nonstick frying pan with the olive oil and cook over medium heat until soft.
Remove from the heat and allow to cool.
Crack the eggs into a large bowl and whisk thoroughly.
Add the cream, cheddar, sun-dried tomatoes, basil, and the onion and mushroom mixture, and mix well to combine. Season with salt and pepper.
Spray your chosen muffin tray with oil, then fill each cavity about three-quarters full with the egg mixture.
Bake for 7 to 9 minutes for a mini muffin tray, and 15 minutes for a regular muffin tray. Keep an eye on these and do not overcook; they are ready when the eggs start to pull away from the sides of the molds and the tops look golden brown and caramelized.
Remove from the oven and allow to cool slightly.
Eat right away, or refrigerate in an airtight container for up to 5 days. To reheat, simply pop in the microwave for 15 to 30 seconds.