Fizz Buzz Kata

In this video we will cover the FizzBuzz Kata / Fizz Buzz Challenge - whatever you want to call it.

The gist of this Kata is to loop through a given range of numbers, usually one to one hundred, and output Fizz if the number is a multiple of three, output Buzz if the number is a multiple of five, and FizzBuzz if the number is a multiple of both three and five.

Ok, so why on Earth would we want to do this?

Well, firstly, this challenge comes up quite frequently in interview situations - depending on the level of job role you are applying for.

Secondly, it is a very easy and gentle introduction to Test Driven Development - which is kinda what this whole Codeception series has been about.

And thirdly, I think it's fun.

This is the method I usually use when doing training sessions on Codeception in person, and it seems to work quite well. It introduces a lot of the required concepts in an easy to understand, and quick to implement manner.

The one way we are going to differ from the norm here is that we are going to put our FizzBuzz code into a Symfony Service. After all, this is really all about how to use Codeception with Symfony 2.

From there, the rest of the video is a walk through of how to successfully complete this Kata, including re-factoring our code and tests as we go.

To make this even more Symfony specific, we will finish off with how to turn this Service into a usable Symfony Console Command.

Code For This Course

Get the code for this course.

Code For This Video

Get the code for this video.


# Title Duration
1 Installing Codeception in Your Symfony 2 Project 04:20
2 Bootstrapping Codeception 02:09
3 Codeception's Folder Structure 06:43
4 Generating Tests 06:28
5 How to Run Codeception Tests 02:44
6 Our First Acceptance Test 08:00
7 An Alternative Perspective on Acceptance Testing 04:33
8 Acceptance Testing Symfony Forms 08:22
9 Acceptance Testing and Javascript (Part 1 of 2) 07:31
10 Acceptance Testing and Javascript (Part 2 of 2) 08:06
11 An Introduction to Unit Testing in Codeception 04:24
12 Unit Testing a Symfony Service 11:59
13 Integration with Symfony 2 06:27
14 Databases and Unit Tests 14:21
15 Real World Unit Testing - Database Clean Up Issues 06:15
16 Fast PHP Unit Testing with SQLite Database 10:19
17 Mocking the Entity Manager 20:22
18 Codeception Selenium Setup 06:08
19 How to Setup XDebug with PHPStorm 07:36
20 Step Objects and Page Objects 09:35
21 Fizz Buzz Kata 24:43
22 Code Coverage Reports 10:30
23 Running Acceptance Tests Faster With Phantom JS 01:30
24 Mobile Browser Tests 01:18