The tendency is to relate equivalence partitioning to black box
testing, which is strictly checking a software component at its
interface without consideration of internal structures of the software.
But having a closer look at the subject there are cases where it applies
to white box testing as well.
Imagine an interface to a component which
has a valid range between 1 and 12 as in the example above. However,
internally the function may have a differentiation of values between 1
and 6 and the values between 7 and 12. Depending on the input value the
software internally will run through different paths to perform slightly
different actions. Regarding the input and output interfaces to the
component this difference will not be noticed, however in your white-box
testing you would like to make sure that both paths are examined. To
achieve this it is necessary to introduce additional equivalence
partitions which would not be needed for black-box testing. For this
example this would be: