More about the acceptance test flow in Mink
As you saw in the previous topic, an acceptance test with Mink is all about finding elements in a page and checking to see whether they do what is expected from them. Behind the scenes, there are four important Mink objects that carry a lot of heavy lifting for us:
Driver
: TheDriver
class implementsBehat\Mink\Driver\DriverInterface
, and Mink deals with every browser emulator or browser controller through this interface. We have two drivers installed in our project (Goutte and Selenium2), but keep in mind that the current version of Mink comes with five drivers out of the box.Session
: Controlling the browser happens through theSession
object. This is where Mink sends HTTP requests and listens for responses.DocumentElement
: This is the actual web page containing all the page elements.NodeElement
: Through this object, you can access and manipulate all the elements in a page.
In general, the acceptance test workflow looks something like this: