Last active
August 29, 2015 14:25
-
-
Save gms8994/6b13ac89985e575792a3 to your computer and use it in GitHub Desktop.
Argument 1 passed to App\Http\Controllers\MainController::search() must be an instance of Illuminate\Http\Request, instance of Symfony\Component\HttpFoundation\Request given
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\Models\Program; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
class MainController extends Controller { | |
protected $model; | |
public function __construct() { | |
$this->model = new Program(); | |
} | |
public function search(Request $request) { | |
$params = $request->all(); | |
$response = $this->model->search($params); | |
return response()->json($response); | |
} | |
public function getById(Request $request, $id, $source_table_id) { | |
$response = $this->model->get($id, $source_table_id); | |
return response()->json($response); | |
} | |
public function getByHash(Request $request, $hash) { | |
$response = $this->model->getByHash($hash); | |
return response()->json($response); | |
} | |
public function getProgram(Request $request) { | |
$response = $this->model->getPrograms($request->all()); | |
return response()->json($response); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$I = new FunctionalTester($scenario); | |
$I->wantTo('perform a search'); | |
$I->amOnPage('/search?school_id=7217'); | |
$I->see('asdf'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Codeception Test Suite Configuration | |
# | |
# Suite for functional (integration) tests | |
# Emulate web requests and make application process them | |
# Include one of framework modules (Symfony2, Yii2, Laravel5) to use it | |
class_name: FunctionalTester | |
modules: | |
enabled: | |
- Lumen | |
- Filesystem | |
- \Helper\Functional |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment