Sort of. There are some things that a person entering a field is expected to know without needing to look them up, because if you don't know it you won't develop good intuition or be able to execute your work in a timely manner. Most of the stuff you learn in your freshman year is this type of thing, while the later years tend to have more open-book tests.
This is also the kind of thing that you check for in an interview - somebody who needs to look up how to write a for loop isn't going to get hired as a C programmer, and somebody who isn't familiar with Ohm's law will flunk their electronics interview. So there's a very pragmatic reason to make sure that students have the basics memorized.
Tests should be open book, open notes, and an extensive amount of time to do the test. The questions should be such that they demonstrate an understanding of the material, not just how well you can parrot back information.
Whilst I would love tests to be open internet, this lends itself to very easy cheating. The material being taught and what notes you take about it should be enough to answer any questions posed to you about the material. Especially those that demonstrate an understanding of the material.