International PHP Conference |
October 21 - 25, 2019 in Munich

Workshop: better and faster — TDD-ing a Ride-hailing Application with PHPUnit, Symfony and Doctrine [SOLD OUT]

This talk originates from the archive. To the CURRENT program
Until September 19th: ✓ PS Classic Mini or Arduino Starter Kit for free ✓ Group discount ✓ Save up to 315 € Register now
Monday, June 3 2019
09:00 - 17:00
Booking note:
TDD Workshop

Imagine building an application without having to mess with a web browser, a REST client or a MySQL client. What if you could build full-blown functionality with realistic data operations within the comfort of a unit test harness? What if this meant shipping code earlier and more frequently than you ever have before? 

Content of the Workshop

This workshop aims to answer the following questions:

  • How do I apply Test-Driven Development when building a Web Application?
  • Where do I start?
  • What kind of architecture should I use?

Beyond that, the idea of this workshop is to challenge the misconception that "TDD makes me slower". We will show how to leverage TDD, to ship a web service faster than you ever have thanks in part to:

  • An enabling architecture
  • The TDD methodology
  • The easy integration of DoctrineORM with PHPUnit, when using the Symfony Framework

Structure of the Workshop

Part 1
Part 2
  • UserRepositoryTest – newUser
  • UserServiceTest – registeruser
  • CreateUserCest – Controller & Database Generation
Part 3
  • UserRepositoryTest – assignRole
  • UserServiceTest – assignRoleToUser
  • CreateUserCest – assignRole & Database Generation
Part 4
  • LocationRepositoryTest – testCreateAndGetNewLocationFromLatLong
  • LocationRepositoryTest – testGetAlreadySavedLocationFromLatLong
  • LocationServiceTest – testGetLocationFromLatLong
Part 5
  • RideRepositoryTest – createRideWithDepartureAndPassenger
  • RideRepositoryTest – assignDestinationToRide
  • RideRepositoryTest – assignDriverToRide
Part 6
  • RideServiceTest – newRide(AppLocation $departure, AppUser $passenger)
  • RideServiceTest – assignDestination
  • RideServiceTest – assignDriver
  • CreateRideCest – newRide, Assign Destination, Assign Driver

  • Attendees should be roughly familiar with the basics of a Test-Driven Development workflow, and ideally, practice some "TDD Katas", which can be found online.
  • I recommend watching this talk before the workshop:
  • I will give attendees a private link to a video replicating the beginning part of this workshop. I will also commit and push the code to a dedicated branch to my GitHub such that attendees will have access to the code.
  • Attendees can choose to watch me code live and ask questions as I code.
  • Attendees can also choose to code alongside me. Those who wish to code alongside me should:

Stay tuned!

Behind the Tracks of IPC

PHP Development
Best Practices & Application

Web Development
Web Development & more

JavaScript Development
All about JavaScript

Agile & Culture
Agility has become mainstream

Concepts & Environments

Web Security
All about Web Security

Testing & Quality
An overview of the most important topics

DevOps is a philosophy