Skip to content

Instantly share code, notes, and snippets.

@MacDada
Created June 10, 2014 23:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MacDada/67c2d73da2bc09963eeb to your computer and use it in GitHub Desktop.
Save MacDada/67c2d73da2bc09963eeb to your computer and use it in GitHub Desktop.
<?php
return
[
'It is initializable' => function ($calculator)
{
$calculator->shouldHaveType('StringCalculator');
},
'It requires string input' => function ($calculator)
{
$calculator->shouldThrow('\InvalidArgumentException')->during('add', [null]);
},
'It adds 2 numbers separated by comma' => function ($calculator)
{
$calculator->add('1,2')->shouldReturn(3);
},
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment