/** * @dataProvider invalidAPICallDP */ public function testInvalidAPICall($a, $b) { $obj = new _API($a); $obj->isValidRequest(); $this->array($obj->invalidAPICall())->isEqualTo($b); }
<?php namespace Stores; use Transvision\Json; // Create our API object $request = new API($url); $response = new Json(); // Check if valid API call if ($request->isValidRequest()) { include MODELS . 'api_model.php'; } else { $json = $response->output($request->invalidAPICall()); } include VIEWS . 'json_view.php'; exit;