for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace spec\Port\Steps\Step;
use Port\Steps\Step;
use PhpSpec\ObjectBehavior;
class ArrayCheckStepSpec extends ObjectBehavior
{
function it_is_initializable()
$this->shouldHaveType('Port\Steps\Step\ArrayCheckStep');
}
function it_is_a_step()
$this->shouldHaveType('Port\Steps\Step');
function it_processes_an_item(Step $step)
$next = function() {};
$item = [];
$step->process($item, $next)->willReturn(true);
$this->process(
process()
spec\Port\Steps\Step\ArrayCheckStepSpec
it_processes_an_item()
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.
$item,
function($item) use ($step, $next) {
return $step->process($item, $next);
);
function it_throws_an_exception_when_item_is_invalid(Step $step)
$item = 'string';
$step->process($item, $next)->shouldNotBeCalled();
$this->shouldThrow('Port\Exception\UnexpectedTypeException')->duringProcess(
This check marks calls to methods that do not seem to exist on an object.
This is most likely the result of a method being renamed without all references to it being renamed likewise.