This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
code200.miha
Hey
I am checking how to use GET call in October? I always get 404 response where CURL works perfectly. Any ideas?
$response = $this->call('GET', '/testCall');
routes.php
Route::get('/testCall', function() { return response("Ping OK", 200); });
myTest.php
class SolrStatusTest extends PluginTestCase
{
protected $baseUrl;
public function setUp()
{
parent::setUp();
$this->baseUrl = \Config::get("app.url");
}
public function testPingOK()
{
// this WORKS!!!
$curl = curl_init( \Config::get("app.url") . "/testCall");
$result = curl_exec($curl);
//NONE of this IS WORKING
$response = $this->call('GET', '/testCall');
$response1 = $this->visit( '/testCall');
$response1->seeStatusCode(200);
}
}
1-1 of 1