International PHP Conference |
December 7 – 11, 2020 in Berlin

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 October 1: ✓ PS Classic or C64 for free ✓ Group discount ✓ Save up to € 520 Register now

More talks in the program:

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 Core Technology
Best Practices & Application

General Web Development
General Web Development & more

Agile & Company Culture
Agility has become mainstream

Software Architecture
Concepts & Environments

All about Web Security

Testing & Test Driven Development
More about software testing tools and strategies

DevOps & Continuous Delivery
DevOps is a philosophy

Docker, Kubernetes, Cloud
Cloud-based & native apps

#slideless (pure coding)
Showing how technology really works

PHP Frameworks
All about PHP Frameworks

Content Management Systems
Sessions on Content Management Systems