Book Image

Functional PHP

By : Gilles Crettenand
Book Image

Functional PHP

By: Gilles Crettenand

Overview of this book

<p>A functional approach encourages code reuse, greatly simplifies testing, and results in code that is concise and easy to understand. This book will demonstrate how PHP can also be used as a functional language, letting you learn about various function techniques to write maintainable and readable code.</p> <p>After a quick introduction to functional programming, we will dive right in with code examples so you can get the most of what you’ve just learned. We will go further with monads, memoization, and property-based testing. You will learn how to make use of modularity of function while writing functional PHP code.</p> <p>Through the tips and best practices in this book, you’ll be able to do more with less code and reduce bugs in your applications. Not only will you be able to boost your performance, but you will also find out how to eliminate common loop problems. By the end of the book, you will know a wide variety of new techniques that you can use on any new or legacy codebase.</p>
Table of Contents (19 chapters)
Functional PHP
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Testing vocabulary


I won't claim to give you a complete glossary of all testing-related terms and also I won't explain the subtle differences and interpretations that could be made for each of them. The idea of this section is simply to lay some common ground.

The glossary won't be in alphabetical order, but rather terms will be grouped by categories. Also, it must by no means be considered a complete glossary. There are a lot more terms and techniques that pertain to testing than what will be presented here, especially if you include all testing methods related to performance, security, and usability:

  • Unit testing: Tests conducted against each individual component separately. What is considered a unit varies-a function/method, a whole class, a whole module. Usually, dependency to other units is mocked to cleanly isolate each part.

  • Functional testing: Tests the software as a black box to ensure that it meets the specifications. External dependency is usually mocked.

  • Integration testing: Tests...