Questions tagged [phpspec]

A php toolset to drive emergent design by specification.

phpspec is a development tool, designed to help you achieve clean and working PHP code by using a technique derived from test-first development called (spec) behaviour driven development, or SpecBDD.

The technique consists of describing the next object behaviour (spec) you are about to implement, using a tool like phpspec, then writing just enough code to quickly satisfy that specification and finally stopping to refactor the last increment, allowing the emergent design to guide the direction. This is done in small iterative steps.

www.phpspec.net

200 questions
0
votes
1 answer

How to user ThrowException matcher in PHPSpec?

I have problem in using ExceptionMatcher...My example spec: class DescribeBall extends \PHPSpec\Context { private $_ball = null; function before() { $this->_ball = $this->spec(new Ball); } function itShouldHaveStatusRolledOnRoll() { …
spamec
  • 301
  • 1
  • 5
  • 15
-1
votes
2 answers

Why phpspec does not see shouldBeLike for object from static constructor?

I'm trying to spec value object with static constructor in phpspec and the problem it says that shouldBeLike is undefined method. The object returned from times method is new Money, so I don't know what is wrong... MoneySpec:
Karol F
  • 1,556
  • 2
  • 18
  • 33
-1
votes
1 answer

Fatal error: Call to a member function when Mocking on PHPSpec

This is the code that i am trying to test public function forgot($email) { try { // Find the user using the user email address $user =$this->sentry->findUserByLogin($email); $resetCode =…
John Dave Decano
  • 128
  • 1
  • 1
  • 5
-2
votes
1 answer

PHPSpec and two PSR-4 Namespace definitions

Apologies upfront if this question has been asked somewhere else or here even (search results did not give me what I was looking for). I would like to configure my core file to live in my own namespace meanwhile, say, application namespace seats…
scruffycoder86
  • 527
  • 1
  • 5
  • 24
-3
votes
2 answers

Phpspec return bad value

I created register service and I want test that method. In the browser var_dump return true and phpspec return false.. Why ? Any Ideas? Service : http://pastebin.com/9hYX7S14 Phpspec : http://pastebin.com/xm5NLYyG Please help.
Matrix12
  • 446
  • 8
  • 19
1 2 3
13
14