From 4118e5f2d988203d492e2fe93604b06fdfa8d26c Mon Sep 17 00:00:00 2001 From: mwjames Date: Fri, 25 Sep 2015 05:18:53 +0200 Subject: [PATCH] Clarify method names --- README.md | 16 +++++---- .../CrossRefFilteredHttpResponseParser.php | 4 +-- src/FilteredHttpResponseParser.php | 16 ++++----- .../NcbiPubMedFilteredHttpResponseParser.php | 34 +++++++++---------- src/NullResponseParser.php | 16 ++++----- src/Oclc/OclcFilteredHttpResponseParser.php | 4 +-- .../OLFilteredHttpResponseParser.php | 4 +-- src/ResponseParser.php | 12 +++---- src/Viaf/ViafFilteredHttpResponseParser.php | 10 +++--- .../CrossRefCannedResponseParserTest.php | 4 +-- .../Ncbi/PubMedCannedResponseParserTest.php | 8 ++--- .../Oclc/OclcCannedResponseParserTest.php | 4 +-- .../OLCannedResponseParserTest.php | 4 +-- .../Viaf/ViafCannedResponseParserTest.php | 4 +-- ...CrossRefFilteredHttpResponseParserTest.php | 4 +-- .../Unit/FilteredHttpResponseParserTest.php | 4 +-- ...biPubMedFilteredHttpResponseParserTest.php | 4 +-- tests/phpunit/Unit/NullResponseParserTest.php | 6 ++-- .../OclcFilteredHttpResponseParserTest.php | 4 +-- .../OLFilteredHttpResponseParserTest.php | 4 +-- .../ViafFilteredHttpResponseParserTest.php | 4 +-- 21 files changed, 86 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index b9770ea..5e09c3b 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ is now being deployed as independent library. Supported providers are: ## Requirements -PHP 5.3 / HHVM 3.3 or later +PHP 5.3 / HHVM 3.5 or later ## Installation @@ -28,7 +28,7 @@ The recommended installation method for this library is to add the dependency to ```json { "require": { - "onoi/remi": "~0.1" + "onoi/remi": "~0.2" } } ``` @@ -49,7 +49,7 @@ $crossRefFilteredHttpResponseParser = $filteredHttpResponseParserFactory->newCro new FilteredRecord() ) -$crossRefFilteredHttpResponseParser->doParseFor( '10.1126/science.1152662' ); +$crossRefFilteredHttpResponseParser->doFilterResponseFor( '10.1126/science.1152662' ); $filteredRecord = new FilteredRecord(); $filteredRecord->setRedactedFields( array( 'pages', 'abstract' ) ); @@ -58,13 +58,13 @@ $pubMedFilteredHttpResponseParser = $filteredHttpResponseParserFactory->newNcbiP $filteredRecord ) -$pubMedFilteredHttpResponseParser->doParseFor( '19782018' ); +$pubMedFilteredHttpResponseParser->doFilterResponseFor( '19782018' ); ``` The `FilteredHttpResponseParser` (implementing the `ResponseParser` interface) returns a -simple `array` record for parsed elements from a REST response. +simple `array` filtered from a REST response. -`FilteredHttpResponseParser::doParseFor` is not expected to make any input validation (in terms of format or -range) for the requested response therefore the implementing class is responsible for an appropriate +`FilteredHttpResponseParser::doFilterResponseFor` is not expected to make any input validation (in terms of +format or range) for the requested response therefore the implementing class is responsible for an appropriate validation process. `FilteredRecord::setRedactedFields` can be used to remove selected fields from the record. @@ -85,6 +85,8 @@ The library provides unit tests that covers the core-functionality normally run ### Release notes +- 0.2 (2015-09-25) + - Changed `ResponseParser` interface to clarify method names - 0.1 (2015-08-03) Initial release - Added `ResponseParser` interface - Added `FilteredHttpResponseParserFactory` to provide access to CrossRef, VIAF, PubMed, OCLC, and OpenLibrary REST API diff --git a/src/CrossRef/CrossRefFilteredHttpResponseParser.php b/src/CrossRef/CrossRefFilteredHttpResponseParser.php index 4347b1d..2b2a701 100644 --- a/src/CrossRef/CrossRefFilteredHttpResponseParser.php +++ b/src/CrossRef/CrossRefFilteredHttpResponseParser.php @@ -32,7 +32,7 @@ public function getRawResponse( $doi ) { * * {@inheritDoc} */ - public function doParseFor( $doi ) { + public function doFilterResponseFor( $doi ) { $json = json_decode( $this->requestResponseFor( $doi ), @@ -53,7 +53,7 @@ public function doParseFor( $doi ) { private function doProcessCiteproc( $json ) { $crossRefCiteprocJsonProcessor = new CrossRefCiteprocJsonProcessor( - $this->getRecord() + $this->getFilteredRecord() ); $crossRefCiteprocJsonProcessor->doProcess( $json ); diff --git a/src/FilteredHttpResponseParser.php b/src/FilteredHttpResponseParser.php index 11ef8d7..10444b3 100644 --- a/src/FilteredHttpResponseParser.php +++ b/src/FilteredHttpResponseParser.php @@ -20,7 +20,7 @@ abstract class FilteredHttpResponseParser implements ResponseParser { /** * @var FilteredRecord */ - protected $record; + protected $filteredRecord; /** * @var array @@ -31,11 +31,11 @@ abstract class FilteredHttpResponseParser implements ResponseParser { * @since 0.1 * * @param HttpRequest $httpRequest - * @param FilteredRecord $record + * @param FilteredRecord $filteredRecord */ - public function __construct( HttpRequest $httpRequest, FilteredRecord $record ) { + public function __construct( HttpRequest $httpRequest, FilteredRecord $filteredRecord ) { $this->httpRequest = $httpRequest; - $this->record = $record; + $this->filteredRecord = $filteredRecord; } /** @@ -61,8 +61,8 @@ public function getMessages() { * * {@inheritDoc} */ - public function getRecord() { - return $this->record; + public function getFilteredRecord() { + return $this->filteredRecord; } /** @@ -70,7 +70,7 @@ public function getRecord() { * * {@inheritDoc} */ - public function usedCache() { + public function usesCache() { return method_exists( $this->httpRequest, 'isCached' ) ? $this->httpRequest->isCached() : false; } @@ -79,7 +79,7 @@ public function usedCache() { * * {@inheritDoc} */ - abstract public function doParseFor( $query ); + abstract public function doFilterResponseFor( $query ); /** * @since 0.1 diff --git a/src/Ncbi/NcbiPubMedFilteredHttpResponseParser.php b/src/Ncbi/NcbiPubMedFilteredHttpResponseParser.php index 942d7f1..5ffdc7e 100644 --- a/src/Ncbi/NcbiPubMedFilteredHttpResponseParser.php +++ b/src/Ncbi/NcbiPubMedFilteredHttpResponseParser.php @@ -28,7 +28,7 @@ class NcbiPubMedFilteredHttpResponseParser extends FilteredHttpResponseParser { */ public function getRawResponse( $id ) { - $db = $this->getRecord()->get( 'ncbi-dbtype' ); + $db = $this->filteredRecord->get( 'ncbi-dbtype' ); return $this->requestSummaryResponseFor( $id, $db ) . $this->requestAbstractResponseFor( $id, $db ); } @@ -38,9 +38,9 @@ public function getRawResponse( $id ) { * * {@inheritDoc} */ - public function doParseFor( $id ) { + public function doFilterResponseFor( $id ) { - $db = $this->getRecord()->get( 'ncbi-dbtype' ); + $db = $this->filteredRecord->get( 'ncbi-dbtype' ); $text = $this->requestSummaryResponseFor( $id, $db ); @@ -78,49 +78,49 @@ private function doProcessSummary( $text, $id, $db ) { if ( isset( $record['pubtype'] ) ) { foreach ( $record['pubtype'] as $type ) { - $this->getRecord()->append( 'type', $type ); + $this->filteredRecord->append( 'type', $type ); } } foreach ( $record['articleids'] as $articleids ) { if ( $articleids['idtype'] === 'doi' ) { - $this->getRecord()->set( 'doi', $articleids['value'] ); + $this->filteredRecord->set( 'doi', $articleids['value'] ); } if ( $articleids['idtype'] === 'pmid' ) { - $this->getRecord()->set( 'pmid', $articleids['value'] ); + $this->filteredRecord->set( 'pmid', $articleids['value'] ); } if ( $articleids['idtype'] === 'pubmed' ) { - $this->getRecord()->set( 'pmid', $articleids['value'] ); + $this->filteredRecord->set( 'pmid', $articleids['value'] ); } if ( $articleids['idtype'] === 'pmcid' && $db === 'pmc' ) { - $this->getRecord()->set( 'pmcid', $articleids['value'] ); + $this->filteredRecord->set( 'pmcid', $articleids['value'] ); } if ( $articleids['idtype'] === 'pmc' && $db === 'pubmed' ) { - $this->getRecord()->set( 'pmcid', $articleids['value'] ); + $this->filteredRecord->set( 'pmcid', $articleids['value'] ); } } foreach ( $record['authors'] as $author ) { - $this->getRecord()->append( 'author', $author['name'] ); + $this->filteredRecord->append( 'author', $author['name'] ); } - $this->getRecord()->set( 'title', $record['title'] ); - $this->getRecord()->set( 'journal', $record['fulljournalname'] ); - $this->getRecord()->set( 'pubdate', $record['pubdate'] ); - $this->getRecord()->set( 'volume', $record['volume'] ); - $this->getRecord()->set( 'issue', $record['issue'] ); - $this->getRecord()->set( 'pages', $record['pages'] ); + $this->filteredRecord->set( 'title', $record['title'] ); + $this->filteredRecord->set( 'journal', $record['fulljournalname'] ); + $this->filteredRecord->set( 'pubdate', $record['pubdate'] ); + $this->filteredRecord->set( 'volume', $record['volume'] ); + $this->filteredRecord->set( 'issue', $record['issue'] ); + $this->filteredRecord->set( 'pages', $record['pages'] ); } private function doProcessAbstract( $xml ) { $ncbiEntrezAbstractXMLProcessor = new NcbiEntrezAbstractXMLProcessor( - $this->getRecord() + $this->filteredRecord ); $ncbiEntrezAbstractXMLProcessor->doProcess( $xml ); diff --git a/src/NullResponseParser.php b/src/NullResponseParser.php index 5e1e3c7..aa3f54a 100644 --- a/src/NullResponseParser.php +++ b/src/NullResponseParser.php @@ -13,15 +13,15 @@ class NullResponseParser implements ResponseParser { /** * @var FilteredRecord */ - private $record; + private $filteredRecord; /** * @since 0.1 * - * @param FilteredRecord $record + * @param FilteredRecord $filteredRecord */ - public function __construct( FilteredRecord $record ) { - $this->record = $record; + public function __construct( FilteredRecord $filteredRecord ) { + $this->filteredRecord = $filteredRecord; } /** @@ -29,8 +29,8 @@ public function __construct( FilteredRecord $record ) { * * {@inheritDoc} */ - public function getRecord() { - return $this->record; + public function getFilteredRecord() { + return $this->filteredRecord; } /** @@ -47,7 +47,7 @@ public function getMessages() { * * {@inheritDoc} */ - public function usedCache() { + public function usesCache() { return false; } @@ -56,7 +56,7 @@ public function usedCache() { * * {@inheritDoc} */ - public function doParseFor( $query ) {} + public function doFilterResponseFor( $query ) {} /** * @since 0.1 diff --git a/src/Oclc/OclcFilteredHttpResponseParser.php b/src/Oclc/OclcFilteredHttpResponseParser.php index 19b2a8a..7ef18b2 100644 --- a/src/Oclc/OclcFilteredHttpResponseParser.php +++ b/src/Oclc/OclcFilteredHttpResponseParser.php @@ -32,7 +32,7 @@ public function getRawResponse( $oclcID ) { * * {@inheritDoc} */ - public function doParseFor( $oclcID ) { + public function doFilterResponseFor( $oclcID ) { $text = $this->requestResponseFor( $oclcID ); @@ -52,7 +52,7 @@ public function doParseFor( $oclcID ) { private function doProcessJsonLd( $oclcID, $jsonld ) { $simpleOclcJsonLdGraphProcessor = new SimpleOclcJsonLdGraphProcessor( - $this->getRecord() + $this->filteredRecord ); $simpleOclcJsonLdGraphProcessor->doProcess( $oclcID, $jsonld ); diff --git a/src/OpenLibrary/OLFilteredHttpResponseParser.php b/src/OpenLibrary/OLFilteredHttpResponseParser.php index 08a896c..fde00db 100644 --- a/src/OpenLibrary/OLFilteredHttpResponseParser.php +++ b/src/OpenLibrary/OLFilteredHttpResponseParser.php @@ -32,7 +32,7 @@ public function getRawResponse( $olID ) { * * {@inheritDoc} */ - public function doParseFor( $olID ) { + public function doFilterResponseFor( $olID ) { $text = $this->requestResponseFor( $olID ); @@ -55,7 +55,7 @@ public function doParseFor( $olID ) { private function doProcessJson( $json ) { $olBooksAPIJsonProcessor = new OLBooksAPIJsonProcessor( - $this->getRecord() + $this->filteredRecord ); $olBooksAPIJsonProcessor->doProcess( $json ); diff --git a/src/ResponseParser.php b/src/ResponseParser.php index 6c2d13e..c99bdad 100644 --- a/src/ResponseParser.php +++ b/src/ResponseParser.php @@ -15,7 +15,7 @@ interface ResponseParser { * * @return FilteredRecord */ - public function getRecord(); + public function getFilteredRecord(); /** * @since 0.1 @@ -29,22 +29,22 @@ public function getMessages(); * * @return boolean */ - public function usedCache(); + public function usesCache(); /** * @since 0.1 * - * @param string $query + * @param string $id */ - public function doParseFor( $query ); + public function doFilterResponseFor( $id ); /** * @since 0.1 * - * @param string $query + * @param string $id * * @return string */ - public function getRawResponse( $query ); + public function getRawResponse( $id ); } diff --git a/src/Viaf/ViafFilteredHttpResponseParser.php b/src/Viaf/ViafFilteredHttpResponseParser.php index 560537e..5cab17b 100644 --- a/src/Viaf/ViafFilteredHttpResponseParser.php +++ b/src/Viaf/ViafFilteredHttpResponseParser.php @@ -33,7 +33,7 @@ public function getRawResponse( $viafID ) { * * {@inheritDoc} */ - public function doParseFor( $viafID ) { + public function doFilterResponseFor( $viafID ) { $xml = $this->requestResponseFor( $viafID ); @@ -63,16 +63,16 @@ private function doProcessDom( $dom, $viafID ) { return $this->addMessage( array( 'onoi-remi-parser-no-id-match', $viafID ) ); } - $this->getRecord()->set( 'viaf', $viafID ); + $this->filteredRecord->set( 'viaf', $viafID ); foreach ( $dom->getElementsByTagName( 'nameType' ) as $item ) { - $this->getRecord()->set( 'type', $item->nodeValue ); + $this->filteredRecord->set( 'type', $item->nodeValue ); } foreach ( $dom->getElementsByTagName( 'sources' ) as $item ) { foreach ( $item->getElementsByTagName( 'source' ) as $i ) { list( $key, $value ) = explode( '|', $i->nodeValue, 2 ); - $this->getRecord()->set( strtolower( $key ), str_replace( ' ' ,'', $value ) ); + $this->filteredRecord->set( strtolower( $key ), str_replace( ' ' ,'', $value ) ); } } @@ -81,7 +81,7 @@ private function doProcessDom( $dom, $viafID ) { foreach ( $dom->getElementsByTagName( 'data' ) as $item ) { foreach ( $item->getElementsByTagName( 'text' ) as $i ) { - $this->getRecord()->set( 'name', str_replace( '.', '', $i->nodeValue ) ); + $this->filteredRecord->set( 'name', str_replace( '.', '', $i->nodeValue ) ); break; } diff --git a/tests/phpunit/Integration/CrossRef/CrossRefCannedResponseParserTest.php b/tests/phpunit/Integration/CrossRef/CrossRefCannedResponseParserTest.php index 28e7607..28f5610 100644 --- a/tests/phpunit/Integration/CrossRef/CrossRefCannedResponseParserTest.php +++ b/tests/phpunit/Integration/CrossRef/CrossRefCannedResponseParserTest.php @@ -51,11 +51,11 @@ public function testParser( $id, $httpRequestFile, $expectedResultFile ) { $instance->getRawResponse( $id ) ); - $instance->doParseFor( $id ); + $instance->doFilterResponseFor( $id ); $this->assertEquals( $expected, - $instance->getRecord()->getRecordFields() + $instance->getFilteredRecord()->getRecordFields() ); } diff --git a/tests/phpunit/Integration/Ncbi/PubMedCannedResponseParserTest.php b/tests/phpunit/Integration/Ncbi/PubMedCannedResponseParserTest.php index 81604ad..8523546 100644 --- a/tests/phpunit/Integration/Ncbi/PubMedCannedResponseParserTest.php +++ b/tests/phpunit/Integration/Ncbi/PubMedCannedResponseParserTest.php @@ -40,11 +40,11 @@ public function testPMIDParser( $id, $httpJsonRequestFile, $httpXmlRequestFile, $instance->getRawResponse( $id ) ); - $instance->doParseFor( $id ); + $instance->doFilterResponseFor( $id ); $this->assertEquals( $expected, - $instance->getRecord()->getRecordFields() + $instance->getFilteredRecord()->getRecordFields() ); } @@ -73,11 +73,11 @@ public function testPMCIDParser( $id, $httpJsonRequestFile, $httpXmlRequestFile, $instance->getRawResponse( $id ) ); - $instance->doParseFor( $id ); + $instance->doFilterResponseFor( $id ); $this->assertEquals( $expected, - $instance->getRecord()->getRecordFields() + $instance->getFilteredRecord()->getRecordFields() ); } diff --git a/tests/phpunit/Integration/Oclc/OclcCannedResponseParserTest.php b/tests/phpunit/Integration/Oclc/OclcCannedResponseParserTest.php index 079c9fb..1aec713 100644 --- a/tests/phpunit/Integration/Oclc/OclcCannedResponseParserTest.php +++ b/tests/phpunit/Integration/Oclc/OclcCannedResponseParserTest.php @@ -51,11 +51,11 @@ public function testParser( $id, $httpRequestFile, $expectedResultFile ) { $instance->getRawResponse( $id ) ); - $instance->doParseFor( $id ); + $instance->doFilterResponseFor( $id ); $this->assertEquals( $expected, - $instance->getRecord()->getRecordFields() + $instance->getFilteredRecord()->getRecordFields() ); } diff --git a/tests/phpunit/Integration/OpenLibrary/OLCannedResponseParserTest.php b/tests/phpunit/Integration/OpenLibrary/OLCannedResponseParserTest.php index e233b81..6301b3d 100644 --- a/tests/phpunit/Integration/OpenLibrary/OLCannedResponseParserTest.php +++ b/tests/phpunit/Integration/OpenLibrary/OLCannedResponseParserTest.php @@ -51,11 +51,11 @@ public function testParser( $id, $httpRequestFile, $expectedResultFile ) { $instance->getRawResponse( $id ) ); - $instance->doParseFor( $id ); + $instance->doFilterResponseFor( $id ); $this->assertEquals( $expected, - $instance->getRecord()->getRecordFields() + $instance->getFilteredRecord()->getRecordFields() ); } diff --git a/tests/phpunit/Integration/Viaf/ViafCannedResponseParserTest.php b/tests/phpunit/Integration/Viaf/ViafCannedResponseParserTest.php index 90ccfbc..deecd0a 100644 --- a/tests/phpunit/Integration/Viaf/ViafCannedResponseParserTest.php +++ b/tests/phpunit/Integration/Viaf/ViafCannedResponseParserTest.php @@ -51,11 +51,11 @@ public function testParser( $id, $httpRequestFile, $expectedResultFile ) { $instance->getRawResponse( $id ) ); - $instance->doParseFor( $id ); + $instance->doFilterResponseFor( $id ); $this->assertEquals( $expected, - $instance->getRecord()->getRecordFields() + $instance->getFilteredRecord()->getRecordFields() ); } diff --git a/tests/phpunit/Unit/CrossRef/CrossRefFilteredHttpResponseParserTest.php b/tests/phpunit/Unit/CrossRef/CrossRefFilteredHttpResponseParserTest.php index 6ab60fb..58f3309 100644 --- a/tests/phpunit/Unit/CrossRef/CrossRefFilteredHttpResponseParserTest.php +++ b/tests/phpunit/Unit/CrossRef/CrossRefFilteredHttpResponseParserTest.php @@ -50,7 +50,7 @@ public function testFailedResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array( @@ -81,7 +81,7 @@ public function testNullResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array( diff --git a/tests/phpunit/Unit/FilteredHttpResponseParserTest.php b/tests/phpunit/Unit/FilteredHttpResponseParserTest.php index 63a419d..6b80189 100644 --- a/tests/phpunit/Unit/FilteredHttpResponseParserTest.php +++ b/tests/phpunit/Unit/FilteredHttpResponseParserTest.php @@ -51,11 +51,11 @@ public function testCommonMethods() { $this->assertEquals( $filteredRecord, - $instance->getRecord() + $instance->getFilteredRecord() ); $this->assertFalse( - $instance->usedCache() + $instance->usesCache() ); $this->assertEmpty( diff --git a/tests/phpunit/Unit/Ncbi/NcbiPubMedFilteredHttpResponseParserTest.php b/tests/phpunit/Unit/Ncbi/NcbiPubMedFilteredHttpResponseParserTest.php index de3eab1..329183d 100644 --- a/tests/phpunit/Unit/Ncbi/NcbiPubMedFilteredHttpResponseParserTest.php +++ b/tests/phpunit/Unit/Ncbi/NcbiPubMedFilteredHttpResponseParserTest.php @@ -50,7 +50,7 @@ public function testFailedResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array( @@ -81,7 +81,7 @@ public function testNullResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array( diff --git a/tests/phpunit/Unit/NullResponseParserTest.php b/tests/phpunit/Unit/NullResponseParserTest.php index f8736a0..28f2d7d 100644 --- a/tests/phpunit/Unit/NullResponseParserTest.php +++ b/tests/phpunit/Unit/NullResponseParserTest.php @@ -37,11 +37,11 @@ public function testCommonMethods() { $this->assertEquals( $filteredRecord, - $instance->getRecord() + $instance->getFilteredRecord() ); $this->assertFalse( - $instance->usedCache() + $instance->usesCache() ); $this->assertEmpty( @@ -49,7 +49,7 @@ public function testCommonMethods() { ); $this->assertNull( - $instance->doParseFor( 42 ) + $instance->doFilterResponseFor( 42 ) ); $this->assertEmpty( diff --git a/tests/phpunit/Unit/Oclc/OclcFilteredHttpResponseParserTest.php b/tests/phpunit/Unit/Oclc/OclcFilteredHttpResponseParserTest.php index 7bee159..94c760c 100644 --- a/tests/phpunit/Unit/Oclc/OclcFilteredHttpResponseParserTest.php +++ b/tests/phpunit/Unit/Oclc/OclcFilteredHttpResponseParserTest.php @@ -50,7 +50,7 @@ public function testFailedResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array( @@ -81,7 +81,7 @@ public function testNullResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array( diff --git a/tests/phpunit/Unit/OpenLibrary/OLFilteredHttpResponseParserTest.php b/tests/phpunit/Unit/OpenLibrary/OLFilteredHttpResponseParserTest.php index 087552f..d5ea646 100644 --- a/tests/phpunit/Unit/OpenLibrary/OLFilteredHttpResponseParserTest.php +++ b/tests/phpunit/Unit/OpenLibrary/OLFilteredHttpResponseParserTest.php @@ -50,7 +50,7 @@ public function testFailedResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array( @@ -81,7 +81,7 @@ public function testNullResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array( diff --git a/tests/phpunit/Unit/Viaf/ViafFilteredHttpResponseParserTest.php b/tests/phpunit/Unit/Viaf/ViafFilteredHttpResponseParserTest.php index 20e9392..2403e72 100644 --- a/tests/phpunit/Unit/Viaf/ViafFilteredHttpResponseParserTest.php +++ b/tests/phpunit/Unit/Viaf/ViafFilteredHttpResponseParserTest.php @@ -50,7 +50,7 @@ public function testFailedResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array( @@ -81,7 +81,7 @@ public function testNullResponse() { $filteredRecord ); - $instance->doParseFor( 'foo' ); + $instance->doFilterResponseFor( 'foo' ); $this->assertEquals( array( array(