Getting started with writing phpspec tests requires grasping a few basic concepts, such as the following:
- The it_*() and its_*() methods: This object behavior is made up of individual examples, each one being flagged with the it_*() or its_*() methods. We can have one or more of these methods defined per single specification. Each defined method gets triggered when a test is run.
- Matchers methods: These are analogous to assertions in PHPUnit. They describe how an object should behave.
- Object construction methods: Every object we describe in phpspec is not a separate variable, but is $this. Sometimes, however, getting the proper $this variable requires managing constructor parameters. This is where the beConstructedWith(),