RU beehive logo ITEC dept promo banner
ITEC 325
2018fall
ibarland

unit tests
a first PHP function


1 Or if the requested resource was (say) in image-file, the http packet's payload would be the bits of the image-file. The payload is actually reponsible for includeing a “mime-type” statement to help the receiver understand how the payload's bits should be interpreted, but it's forgivable to think of the payload as just being the bits all the other meta-information as part of some-header-or-another, w/o worrying to distinguish http header info from other headers.      
2 For example, see some examples on wikipedia.      
3 Okay, okay, here's the third component right now: A way to automatically compare the actual and expected outputs, so that we don't rely on having to manually scour output with a human eye.      
4 A type-safe language should catch this sort of error; if using a non-type-safe language, or one with liberal auto-type-coercion (like php), then Turing help you. …You might add macros or pre-processing to your source code, to catch type errors in this case. For our class, using php (with dangerously liberal auto-type-coercion), we'll ignore this, since it's not in the scope of a web-programming class. This requires extra vigilance on you as a programmer, to be sure you're providing the right types.      

logo for creative commons by-attribution license
This page licensed CC-BY 4.0 Ian Barland
Page last generated
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.