/** * @dataProvider canHandleProvider */ public function testCanHandle($id, $version, $contentType, $expected) { $writer = new JsonODataV1Writer(); $actual = $writer->canHandle($version, $contentType); $this->assertEquals($expected, $actual, $id); }
/** * begin write OData links * * @param ODataURLCollection $urls url collection to write * * @return JsonODataV2Writer */ public function writeUrlCollection(ODataURLCollection $urls) { $this->writeRowCount($urls->count); $this->writeNextPageLink($urls->nextPageLink); // Json Format V2: // "results": $this->_writer->writeName($this->dataArrayName)->startArrayScope(); parent::writeUrlCollection($urls); $this->_writer->endScope(); return $this; }