Cook the pasta according to the instructions on the packet.
Meanwhile, cut the onion and basil into small pieces, mix with the olive oil and the pressed garlic clove and season with salt and pepper. Cut the tomatoes and mozzarella into small cubes and add. Drain the pasta, let it cool down and mix in.
The salad tastes even better when it has stood in the refrigerator and is pulled through.