PHPackages                             sam152/mink-page-objects - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. sam152/mink-page-objects

ActiveLibrary[Testing &amp; Quality](/categories/testing)

sam152/mink-page-objects
========================

Generic page objects for phpunit.

0.0.3(7y ago)18PHP

Since May 16Pushed 7y agoCompare

[ Source](https://github.com/Sam152/mink-page-objects)[ Packagist](https://packagist.org/packages/sam152/mink-page-objects)[ RSS](/packages/sam152-mink-page-objects/feed)WikiDiscussions 0.0.x Synced 3d ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

Mink Page Objects
=================

[](#mink-page-objects)

[![CircleCI](https://camo.githubusercontent.com/cce61467c2c147ae99011a379eaa0108af9997db12537411824c208a74f5533c/68747470733a2f2f636972636c6563692e636f6d2f67682f53616d3135322f6d696e6b2d706167652d6f626a656374732e7376673f7374796c653d737667)](https://circleci.com/gh/Sam152/mink-page-objects)

An implementation of page objects, using the Mink API. This library is a thin layer on top of the existing Mink API, but encapsulated into page objects. A page object may contain a list of selectors, form fields and methods for performing common testing related actions.

This library is designed to be lightweight and introduce as little new API surface on top of the existing Mink API as possible. The selector and form field list is inspired by [nightwatch.js](https://nightwatchjs.org/guide#working-with-page-objects).

By implementing page objects:

- You create tests that are easier to read and maintain.
- You reduce coupling between test cases and markup.
- You encourage thorough testing by making the whole process easier.

Further reading on the benefits of page objects can be found on [Martin Fowler's blog post](https://martinfowler.com/bliki/PageObject.html) on the subject.

Here is an example of a page object you might define with this library for a login page:

```
