<?php
namespace spec\Acme;
use PhpSpec\ObjectBehavior;
use Prophecy\Arguement;
class FizzBuzzSpec extends ObjectBehavior {
function it_is_initializable()
{
$this->shouldHaveType('Acme\FizzBuzz');
}
function it_traslates_1_for_fizzbuzz()
{
$this->execute(1)-shouldReturn(1);
}
function it_traslates_2_for_fizzbuzz()
{
$this->execute(2)-shouldReturn(2);
}
function it_traslates_3_for_fizzbuzz()
{
$this->execute(3)-shouldReturn('fizz');
}
function it_traslates_5_for_fizzbuzz()
{
$this->execute(5)-shouldReturn('buzz');
}
function it_traslates_6_for_fizzbuzz()
{
$this->execute(6)-shouldReturn('fizz');
}
function it_traslates_10_for_fizzbuzz()
{
$this->execute(10)-shouldReturn('buzz');
}
function it_traslates_15_for_fizzbuzz()
{
$this->execute(15)-shouldReturn('fizzbuzz');
}
function it_translates_a_sequence_of_numbers_for_fizzbuzz()
{
$this->executeUpTo(10)->shouldReturn([1, 2, 'fizz', 4, 'buzz', 'fizz', 7, 8, 'fizz', 'buzz']);
}
}