Object Oriented PHP & TDD with PHPUnit from Scratch
4.3 (104 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
7,251 students enrolled

Object Oriented PHP & TDD with PHPUnit from Scratch

Learn Object Oriented PHP & Test Driven Development using PHPUnit - Project Included
4.3 (104 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
7,251 students enrolled
Last updated 6/2019
English
English [Auto], French [Auto], 1 more
  • Indonesian [Auto]
Current price: $69.99 Original price: $99.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 12.5 hours on-demand video
  • 2 articles
  • 36 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Learn test-driven development (TDD)
  • Understand Object Oriented PHP
  • Learn how to write unit tests using PHPUnit
  • Learn how and why you should use dependency invasion principle (DIP) and dependency injection
  • Build a scalable object oriented PHP application
  • Implement some common design patterns using PHP
  • Build a database wrapper with support for PDO and MySQLi
Course content
Expand all 68 lectures 12:16:00
+ PHP Object-Oriented Bootcamp
17 lectures 02:32:11
How to Get Help
00:20
Download Complete Source code
00:14

In this lecture we start by examining the basic structure of a PHP class, create a class with properties and behaviors, create an object and use it.

Preview 13:16

Now that you know how to create and instantiate a class you’re now ready to learn how to initialize an object using a constructor.

Preview 07:38

Encapsulation refers to protecting the internals of an object from direct manipulation by the client. The client can send messages, but the client cannot directly change the properties in the object. Lets see how to encapsulate an object in PHP.

Encapsulation
13:40

Inheritance is the ability for a subclass to inherits all of the public and protected methods and properties from the parent class.

Object Inheritance
09:58

Declaring class properties or methods as static makes them accessible without needing an instantiation of the class. Let talk about Static Methods & Properties and learn how to use them in PHP.

Static Methods & Properties
07:40

With Object-oriented programming the possibilities are endless, lets now consider a new concept in OOP called method chaining.

Method Chaining
05:41

In this lecture you will learn both theoretical and practical implementation of abstract classes in PHP using a simple case study

Abstract Classes (Database Case Study)
13:26

In this lecture you will learn both theoretical and practical implementation of abstract classes in PHP using a simple case study.

Abstract Classes (Database Case Study) - Conclusion
18:31

In this lecture, you will learn about object interfaces in PHP, why they are important, why you should use them and also how to use interfaces using a simple case study.

Object Interfaces (Predator and Prey Case Study)
18:51

Lets talk more about late static binding and fix a bug from the last lecture using late static binding.

Late Static Binding
03:13

Let's now discuss about namespacing and autoloading in PHP as these are two very important aspect when building model applications

Namespacing and Better Autoloading
16:07

In this video I'll go over the requirements for the simple grading class that we are going to build

Simple OOP Project: Grading Class Overview
03:05

Lets build the class to compute result for 5 subjects in a semester

Simple OOP Project: Compute Student Semester Result Class
12:59

Time to tie everything together by linking the grading class to the form and outputting relevant data to the UI

Simple OOP Project: Using The Compute Student Semester Result Class
06:44
+ Project - Build A bug Tracking App: Setup
5 lectures 45:28
Section Introduction
00:59
Autoloading and Installing PHPUnit
08:32
Working with config files
17:33
Creating Application Helper Class
14:00
+ Project - Build A bug Tracking App: Handling Exceptions
3 lectures 25:02
Custom Exception Handler
09:23
Custom Exception Classes
06:52
Convert PHP Warnings and Notices to Exceptions
08:47
+ Project - Build A bug Tracking App: Application Logs
3 lectures 27:59
PSR-3: Logger Interface
08:03
Concrete Implementation of Logger Interface
14:51
Logging
05:05
+ Project - Build A bug Tracking App: Getting Started With PHPUnit
4 lectures 37:59
Creating a PHPUnit Configuration file
07:25
Unit Testing The App Class
10:20
Unit Testing The Logger Class
13:38
+ Project - Build A Database Abstraction Layer with Support for PDO & MySQLi APIs
17 lectures 03:58:17
Database Abstraction UML Diagram
05:36
Test Driven Database Connection - Part 1
24:35
Test Driven Database Connection - Part 2 PDO
20:17
Test Driven Database Connection - Part 3 MySQLi
10:11
Building a Database Query Builder Intro with Test Cases
12:04
Abstract Database Query Builder with TDD - Part 1
12:20
Abstract Database Query Builder with TDD - Part 2
18:49
Abstract Database Query Builder with TDD - Part 3
17:32
Adding Abstract Methods In Query Builder Class
05:54
Implementing Abstract Methods for PDO API
06:38
Implementing Abstract Methods for MySQLi API
26:26
Implement Insert, Raw Query, find and findOne Methods and Test cases
19:39
Implement Delete and Update Methods
03:20
Creating a Database Query Builder Factory
06:04
Automatically Cleanup the Database for Each New Test
18:47
Adding More Test Cases
16:21
Query Builder Cleanup and Bug Fixes
13:44
+ Project - Entities And Repositories
6 lectures 01:20:03

A brief introduction to the concept of Entities and Repositories design pattern.

The concept of Entities and Repository Pattern
05:17

Let's start this section by writing few test-cases for Entities and Repository.

Writing Test cases for Entities and Repository
19:37

In this lecture let's create an abstract entity and also an entity named BugReport

Creating an Entity
13:33

PHP Implementation of the repository pattern

Repository Pattern Part 1 - Interface
06:03

PHP Implementation of the repository pattern

Repository Pattern Part 2 - Abstract and Concrete
18:13

Making Test Cases Pass and Adding new Test

Making Test Cases Pass and Adding new Test
17:20
+ Project - Writing Functional Test and The User Interface
13 lectures 02:09:01

Writing Test Case for Create Bug Report with POST Request

Writing Test Case for Create Bug Report with POST Request
16:54

Writing Test Case for Update and Delete Bug Report with POST Request

Writing Test Case for Update and Delete Bug Report with POST Request
08:27
Building a Simple HTTP Request Client to make our Test Cases Pass
16:59
Processing Add Bug Report Post Request
13:05
Logging During Request Life Cycle and Exception Handling
06:57
Refactoring, Debugging and Making Add Report Test Pass
13:48
Processing Update Delete and Read Requests and Going Green with All Test Cases
16:39

Lets build a simple CRUD UI

User Interface - Part 1
15:27
User Interface - Part 2
08:07

Testing that We Can Visit The Homepage and See Certain Data

Testing that We Can Visit The Homepage and See Certain Data
04:41
Next Step
01:37
Requirements
  • Basic knowledge of PHP
  • Basis Knowledge of PDO or MySQLi
  • PHP 7 or Higher
Description

As a PHP developer it won't take long to realize that there are dozens of outdated tutorials and articles on the internet, if you want to learn how to write better code with fewer bugs, you will need to know how to write clean object oriented code and unit tests.

This course is designed to get you up and running as fast as possible with Test Driven Development with object oriented PHP and PHPUnit without any dependencies. We'll quickly cover OOP basics, then dive into some of the more advanced features of the language. Don't be tricked by other courses that only teach you basic and outdated stuff!

This is the only course on Udemy that will teach you Test Driven Development in Object Oriented PHP and PHPUnit. This course will give you ample opportunities to strike out on your own and start working on your own programs.

In this course you will:

  • Understand Object Oriented PHP

  • Learn test-driven development (TDD)

  • Learn how and why you should use dependency inversion principle and dependency injection

  • Implement some common design patterns using PHP

  • Build a database wrapper with support for PDO and MySQLi

  • Gain a sense of when to use basic language features

PHP is one of the most popular and widely used programming languages. Get job-ready with PHP today by enrolling now!

Who this course is for:
  • Developers who wants to learn object oriented PHP and test driven development
  • Developers who need to learn object oriented PHP the right way