Book Image

FuelPHP Application Development Blueprints

By : Sebastien Drouyer
Book Image

FuelPHP Application Development Blueprints

By: Sebastien Drouyer

Overview of this book

Table of Contents (13 chapters)
FuelPHP Application Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Unit tests


Unit tests are particularly suitable for this project, as it is important to regularly check if the API is returning the correct data. We will in this section quickly introduce you to how unit tests are implemented in FuelPHP. These tests will be very superficial as this is just an introduction. If you are not familiar with unit tests, you can start by reading the FuelPHP documentation about unit testing at http://fuelphp.com/docs/general/unit_testing.html.

The documentation can be accessed at the FuelPHP website by navigating to DOCS | FuelPHP | General | Unit Testing.

For more general information, you can look at the Wikipedia web page for more references (http://en.wikipedia.org/wiki/Unit_testing).

To make things short, unit tests allow you to test individual units in your code, such as methods or classes, to check if they work as intended. In most cases, they are executed regularly to check if there is no regression in your project. In the Test Driven Development process, tests...