for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace spec\Xabbuh\XApi\Serializer\Normalizer;
use PhpSpec\ObjectBehavior;
use Xabbuh\XApi\Model\Account;
class AccountNormalizerSpec extends ObjectBehavior
{
function it_is_a_normalizer()
$this->shouldHaveType('Symfony\Component\Serializer\Normalizer\NormalizerInterface');
}
function it_is_a_denormalizer()
$this->shouldHaveType('Symfony\Component\Serializer\Normalizer\DenormalizerInterface');
function it_normalizes_accounts()
$data = $this->normalize(new Account('1625378', 'http://www.example.com'));
$data->shouldHaveCount(2);
$data->shouldHaveKey('homePage');
$data->shouldHaveKey('name');
$data['homePage']->shouldBeEqualTo('http://www.example.com');
$data['name']->shouldBeEqualTo('1625378');