for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Onoi\Remi\Tests;
use Onoi\Remi\NullResponseParser;
/**
* @covers \Onoi\Remi\NullResponseParser
* @group onoi-remi
*
* @license GNU GPL v2+
* @since 0.1
* @author mwjames
*/
class NullResponseParserTest extends \PHPUnit_Framework_TestCase {
public function testCanConstruct() {
$filteredRecord = $this->getMockBuilder( '\Onoi\Remi\FilteredRecord' )
->disableOriginalConstructor()
->getMock();
$this->assertInstanceOf(
'\Onoi\Remi\NullResponseParser',
new NullResponseParser( $filteredRecord )
);
}
public function testCommonMethods() {
$instance = new NullResponseParser( $filteredRecord );
$this->assertEquals(
$filteredRecord,
$instance->getFilteredRecord()
$this->assertFalse(
$instance->usesCache()
$this->assertEmpty(
$instance->getMessages()
$this->assertNull(
$instance->doFilterResponseById( 42 )
$instance->doFilterResponseFor( 42 )
$instance->getRawResponse( 42 )
$instance->getRawResponseById( 42 )