Skip to content

Small exercise to differentiate the different types of test doubles in PHP

Notifications You must be signed in to change notification settings

DeGraciaMathieu/dummy-stub-spy-mock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Dummy vs Stub vs Spy vs Mock

image

The "System under test" (SUT) refers to the class being tested.

  • Dummy: facilitates the instantiation of the SUT
  • Stub: manipulates the indirect inputs of the SUT
  • Spy and Mock: control and verify the indirect outputs of the SUT

Indirect inputs refer to the information that the SUT needs to function which cannot be supplied through its signature.

Indirect outputs refer to the information that cannot be verified through the signature provided.

image

About

Small exercise to differentiate the different types of test doubles in PHP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages