FupingQiu / okrsw

0 stars 0 forks source link

$this->json('get', '/api/okrs', $headers)->assertStatus(200); #28

Open FupingQiu opened 5 years ago

FupingQiu commented 5 years ago
    $user = User::find(rand(1,5));
    if ($user == null)
        $user = factory(User::class)->create();
    Log::info(__CLASS__ . '::' . __FUNCTION__  . ', user = ' . $user->id);
    $token = $user->createToken('token', [])->accessToken;
    $headers = ['Authorization' => "Bearer $token"];

$this->json('get', '/api/okrs', $headers)->assertStatus(200);

[2019-11-07 23:57:08] testing.INFO: Tests\Feature\AnnualObjectsAPITest::testIndex, user = 1
[2019-11-07 23:57:08] testing.ERROR: syntax error, unexpected 'try' (T_TRY) {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): syntax error, unexpected 'try' (T_TRY) at E:\laragon40\www\OKRsing\app\Http\Controllers\AnnualObjectsController.php:81) [stacktrace]

0 E:\laragon40\www\OKRsing\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile('E:\\laragon40\\ww...')

1 [internal function]: Composer\Autoload\ClassLoader->loadClass('App\\Http\\Contro...')

FupingQiu commented 5 years ago

[2019-11-09 00:04:59] testing.ERROR: syntax error, unexpected 'try' (T_TRY) {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): syntax error, unexpected 'try' (T_TRY) at E:\laragon40\www\OKRsing\app\Http\Controllers\AnnualObjectsController.php:81) [stacktrace]

0 E:\laragon40\www\OKRsing\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile('E:\\laragon40\\ww...')