What caused Britain and France to declare war on Germany in world war 2?

When Germany invaded Poland on September 7, 1939 and quickly overran it.