Book Image

Test-Driven Development with PHP 8

By : Rainier Sarabia
Book Image

Test-Driven Development with PHP 8

By: Rainier Sarabia

Overview of this book

PHP web developers end up building complex enterprise projects without prior experience in test-driven and behavior-driven development which results in software that’s complex and difficult to maintain. This step-by-step guide helps you manage the complexities of large-scale web applications. It takes you through the processes of working on a project, starting from understanding business requirements and translating them into actual maintainable software, to automated deployments. You’ll learn how to break down business requirements into workable and actionable lists using Jira. Using those organized lists of business requirements, you’ll understand how to implement behavior-driven development (BDD) and test-driven development (TDD) to start writing maintainable PHP code. You’ll explore how to use the automated tests to help you stop introducing regressions to an application each time you release code by using continuous integration. By the end of this book, you’ll have learned how to start a PHP project, break down the requirements, build test scenarios and automated tests, and write more testable and maintainable PHP code. By learning these processes, you’ll be able to develop more maintainable, and reliable enterprise PHP applications.
Table of Contents (17 chapters)
1
Part 1 – Technical Background and Setup
6
Part 2 – Implementing Test-Driven Development in a PHP Project
11
Part 3 – Deployment Automation and Monitoring

Index

As this ebook edition doesn't have fixed pagination, the page numbers below are hyperlinked for reference only, based on the printed edition of this book.

A

abstract class 59

abstraction

in OOP 58, 59

accessors 65

application performance data 296-300

application performance monitoring (APM) 293

Atlassian Jira 15

AWS CodeDeploy application

creating 268-272

AWS EC2 instance

connecting to 272

Elastic IP, attaching to 276-279

need for 258

setting up 258-268

AWS resources 258

B

Behat 129

installing 130

used, for applying behavior-driven development (BDD) 129

Behat application

preparing 245, 246

Behat feature

creating 131, 132

Feature keyword 132

Scenario keyword 132, 133

Behat feature, based on Jira ticket

creating 157, 158

Behat PHP context

generating 181, 182

Behat registration feature

creating 158-163

fail controller tests, writing 164, 165

passing 163...