Philosophy encompasses science. Testable hypothesis are a philosophical idea, justified on philosophical grounds. You can't justify the very idea of "testable hypothesis and experiments" by using testable hypothesis and experiments. There is a branch of philosophy devoted to this type of question, called "philosophy of science".
One very famous philosopher of science, Karl Popper, gave us the idea that for something to be considered a scientific theory, it must be possible to devise and experiment that could, in principle, falsify the theory. Still, the issue is not settled and there are alternative positions. These are deep questions.
One interesting thing to retain here is that science provides empirical knowledge, but there are other forms of knowledge. You alluded to "testable hypothesis", and so you in fact deployed non-empirical knowledge.
The scientific method gave birth to a branch of philosophy, first known as "natural philosophy", and modernly known as "science".