Skip to content
Fabian Schmengler edited this page Oct 9, 2017 · 9 revisions

This wiki contains the exercise descriptions for the Test Driven Magento course. Most exercises come with a prepared module that can be cloned from a separate repository. They have branches with solutions for each exercise.

Integration Tests

Chapter 1: Configuration

Learning goal:

  • create integration test suite and first test
  • use the object manager in integration tests
  • access framework configuration in integration tests

Chapter 2: Controllers

Learning goal:

  • use the base controller test case
  • use annotations for application state
  • use data fixtures
  • test ACL for backend controllers

Chapter 3: Database Layer

Learning goal:

  • test repositories
  • test custom attributes
  • write testable abstractions

Unit Tests

Chapter 1: Test Doubles

Learning goal:

  • create unit test suite and first test
  • create mocks and stubs for core classes with PHPUnit

Chapter 2: Ports and Adapters

Learning goal:

  • decouple business logic from core classes
  • create custom test doubles