---
title: "Discussion on \"Test Doubles in PHP with Mockery and PHPUnit\" | Hashnode"
description: "Discussion on \"Test Doubles in PHP with Mockery and PHPUnit\". Test doubles is a technique in which you replace the actual object with pretend object or a real method by pretend method or pre-define the return data and function arguments for a method to ease the testing purpose. In the real world, our applicatio..."
url: "https://hashnode.com/posts/test-doubles-in-php-with-mockery-and-phpunit/642661637d1a2cc219e3e275"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Test Doubles in PHP with Mockery and PHPUnit](https://blog.jobins.jp/test-doubles-in-php-with-mockery-and-phpunit?utm_source=hashnode&utm_medium=feed)

Test doubles is a technique in which you replace the actual object with pretend object or a real method by pretend method or pre-define the return data and function arguments for a method to ease the testing purpose. In the real world, our applicatio...

Mar 31, 2023 · 5 min read · blog.jobins.jp  
Read the article

-   [#testing](https://hashnode.com/tag/testing)
-   [#phpunit](https://hashnode.com/tag/phpunit)
-   [#tdd](https://hashnode.com/tag/tdd)
-   [#fake](https://hashnode.com/tag/fake)
-   [#mockery](https://hashnode.com/tag/mockery)

## Written by

[Bedram Tamang](https://hashnode.com/@Bedram)

@Bedram

  
[View profile](https://hashnode.com/@Bedram)

## Responses 1

Markdown supported · ⌘↵ to post

[Nirajan Basnet](https://hashnode.com/@nirajanbasnet)

[Mar 31, 2023](https://hashnode.com/posts/test-doubles-in-php-with-mockery-and-phpunit/642661637d1a2cc219e3e275/comment/642687c0975e3bb9a50f7829)

Great article. Keep it up :)
