Skip to content

Instantly share code, notes, and snippets.

@andyfowler
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save andyfowler/9041816 to your computer and use it in GitHub Desktop.

Select an option

Save andyfowler/9041816 to your computer and use it in GitHub Desktop.

Revisions

  1. andyfowler revised this gist Feb 16, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion php-mocking.md
    Original file line number Diff line number Diff line change
    @@ -18,6 +18,6 @@ Nicer verification (like spies), but stubbing syntax is as bad as mockery. Bad d

    ### [Prophecy](https://github.com/phpspec/prophecy)

    ![Come on!](http://cl.ly/image/081i1C2E2x2w)
    ![Come on!](http://cl.ly/image/081i1C2E2x2w/content)

    Oh come on! Who's inventing this stuff?!
  2. andyfowler revised this gist Feb 16, 2014. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion php-mocking.md
    Original file line number Diff line number Diff line change
    @@ -18,4 +18,6 @@ Nicer verification (like spies), but stubbing syntax is as bad as mockery. Bad d

    ### [Prophecy](https://github.com/phpspec/prophecy)

    [Oh come on!!](http://cl.ly/image/081i1C2E2x2w) — who's inventing this stuff?!
    ![Come on!](http://cl.ly/image/081i1C2E2x2w)

    Oh come on! Who's inventing this stuff?!
  3. andyfowler created this gist Feb 16, 2014.
    21 changes: 21 additions & 0 deletions php-mocking.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    Why are PHP's mocking libraries so weak?

    ### [phpunit-mock-objects](http://phpunit.de/manual/3.7/en/test-doubles.html)

    Kludgy, disgusting syntax.

    ### [mockery](https://github.com/padraic/mockery)

    Seems to have the most momentum, but I don't like its DSL, which seems more complex than 95% of cases need. Bad docs: a 1,600-line README?

    ### [AspectMock](https://github.com/Codeception/AspectMock)

    Dead-simple syntax (four public methods to remember) and the ability to mock non-dependency-injected code. Heavy overhead in the AOP framework it relies on. But this is still the library I'm liking the best.

    ### [Phake](https://github.com/mlively/Phake)

    Nicer verification (like spies), but stubbing syntax is as bad as mockery. Bad docs.

    ### [Prophecy](https://github.com/phpspec/prophecy)

    [Oh come on!!](http://cl.ly/image/081i1C2E2x2w) — who's inventing this stuff?!