Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class EchoTest extends TestCase
- {
- public function testEcho()
- {
- $this->json('POST', '/echo', ['string' => "first"]);
- $this->json('POST', '/echo', ['string' => "second"]);
- $this->json('POST', '/echo', ['string' => "third"]);
- }
- }
- <?php
- namespace AppHttpControllers;
- use AppHttpControllersController;
- use IlluminateSupportFacadesInput;
- class EchoController extends Controller
- {
- public function _echo()
- {
- $input = Input::json()->all();
- var_dump($input['string']);
- }
- }
- <?php
- $app->post('echo', ['uses' => 'EchoController@_echo']);
- .string(5) "first"
- string(5) "first"
- string(5) "first"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement