2017 © Pedro Peláez
 

library mockable-predis

A class that extends Predis/Client and has all its magic methods anotated so you can create Prophecy mocks

image

rodrigodiez/mockable-predis

A class that extends Predis/Client and has all its magic methods anotated so you can create Prophecy mocks

  • Tuesday, February 16, 2016
  • by rodrigodiez
  • Repository
  • 1 Watchers
  • 0 Stars
  • 211 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Build Status SensioLabsInsight Packagist Downloads, (*1)

Mockable Predis

This project allows developers to use PhpSpec/Prophecy to TDD projects that use Predis by allowing mocks of the Client to be created., (*2)

Installation

composer require rodrigodiez/mockable-predis

Use

Just use RodrigoDiez\MockablePredis\Client class in your code instead of Predis\Client, (*3)

Why is this needed?

Predis makes intensive use of magic call methods in its Client class making it impossible for some mocking frameworks to guess its interface and create mocks., (*4)

One common workaround when using magic call methods within a class is to document them using @method annotations as described here, (*5)

Predis maintainers decided to document these methods in the ClientInterface instead of doing it in the Client class itself as recommended by phpdoc documentation. On the other hand, Prophecy maintainers refuse to read @method annotations from interfaces., (*6)

Full history and both sides arguments can be found here and here., (*7)

The Versions

16/02 2016

dev-master

9999999-dev

A class that extends Predis/Client and has all its magic methods anotated so you can create Prophecy mocks

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rodrigo Diez Villamuera

16/02 2016

dev-develop

dev-develop

A class that extends Predis/Client and has all its magic methods anotated so you can create Prophecy mocks

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rodrigo Diez Villamuera

16/02 2016

1.0.4

1.0.4.0

A class that extends Predis/Client and has all its magic methods anotated so you can create Prophecy mocks

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rodrigo Diez Villamuera

15/02 2016

1.0.3

1.0.3.0

A class that extends Predis/Client and has all its magic methods anotated so you can create Prophecy mocks

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rodrigo Diez Villamuera

12/02 2016

1.0.2

1.0.2.0

A class that extends Predis/Client and has all its magic methods anotated so you can create Prophecy mocks

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rodrigo Diez Villamuera

12/02 2016

1.0.1

1.0.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rodrigo Diez Villamuera

12/02 2016

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Rodrigo Diez Villamuera