for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Stack Exchange Api Client library.
*
* Copyright (c) 2014-2016 Beñat Espiña <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PhpSpec\BenatEspina\StackExchangeApiClient\Application\DataTransformer;
use BenatEspina\StackExchangeApiClient\Application\DataTransformer\ResponseDataTransformer;
use BenatEspina\StackExchangeApiClient\Application\DataTransformer\ResponseNoTransformationDataTransformer;
use PhpSpec\ObjectBehavior;
use Psr\Http\Message\ResponseInterface;
/**
* Spec file of ResponseNoTransformationDataTransformer class.
* @author Beñat Espiña <[email protected]>
class ResponseNoTransformationDataTransformerSpec extends ObjectBehavior
{
function it_is_initializable()
$this->shouldHaveType(ResponseNoTransformationDataTransformer::class);
}
function it_implements_response_data_transformer()
$this->shouldImplement(ResponseDataTransformer::class);
function it_writes(ResponseInterface $response)
$this->write($response);
function it_reads(ResponseInterface $response)
$this->read($response)->shouldReturn([]);
$this->read($response)->shouldReturn($response);