We have Laravel 5 controllers method:
public function getInput()
{
$input = \\Request::all();
$links = $input[\'links\'];
$this->startLinks = exp
I think you are looking for this.
If your test class extends TestCase
you will get a lot of helper methods which will do heavy lifting for you.
function testSomething() {
// POST request to your controller@action
$response = $this->action('POST', 'YourController@yourAction', ['links' => 'link1 \n link2']);
// you can check if response was ok
$this->assertTrue($response->isOk(), "Custom message if something went wrong");
// or if view received variable
$this->assertViewHas('links', ['link1', 'link2']);
}
Codeception extends this functionality even further.