|
7 | 7 | use Illuminate\Database\Eloquent\Model;
|
8 | 8 | use Illuminate\Database\Eloquent\SoftDeletes;
|
9 | 9 | use Illuminate\Database\Schema\Blueprint;
|
10 |
| -use Illuminate\Http\Request; |
11 |
| -use Illuminate\Routing\Controller; |
12 | 10 | use Illuminate\Support\Facades\Route;
|
13 | 11 | use Illuminate\Support\Facades\Schema;
|
14 | 12 | use Orchestra\Testbench\Concerns\InteractsWithPublishedFiles;
|
15 | 13 | use Orchestra\Testbench\TestCase;
|
16 | 14 |
|
17 |
| -class ImplicitController extends Controller |
18 |
| -{ |
19 |
| - /** |
20 |
| - * Display a listing of the resource. |
21 |
| - */ |
22 |
| - public function index() |
23 |
| - { |
24 |
| - // |
25 |
| - } |
26 |
| - |
27 |
| - /** |
28 |
| - * Show the form for creating a new resource. |
29 |
| - */ |
30 |
| - public function create() |
31 |
| - { |
32 |
| - // |
33 |
| - } |
34 |
| - |
35 |
| - /** |
36 |
| - * Store a newly created resource in storage. |
37 |
| - */ |
38 |
| - public function store(Request $request) |
39 |
| - { |
40 |
| - // |
41 |
| - } |
42 |
| - |
43 |
| - /** |
44 |
| - * Display the specified resource. |
45 |
| - */ |
46 |
| - public function show(ImplicitBindingUser $user) |
47 |
| - { |
48 |
| - return $user; |
49 |
| - } |
50 |
| - |
51 |
| - /** |
52 |
| - * Show the form for editing the specified resource. |
53 |
| - */ |
54 |
| - public function edit(ImplicitBindingUser $user) |
55 |
| - { |
56 |
| - // |
57 |
| - } |
58 |
| - |
59 |
| - /** |
60 |
| - * Update the specified resource in storage. |
61 |
| - */ |
62 |
| - public function update(Request $request, ImplicitBindingUser $user) |
63 |
| - { |
64 |
| - // |
65 |
| - } |
66 |
| - |
67 |
| - /** |
68 |
| - * Remove the specified resource from storage. |
69 |
| - */ |
70 |
| - public function destroy(ImplicitBindingUser $user) |
71 |
| - { |
72 |
| - // |
73 |
| - } |
74 |
| -} |
75 |
| - |
76 | 15 | class ImplicitModelRouteBindingTest extends TestCase
|
77 | 16 | {
|
78 | 17 | use InteractsWithPublishedFiles;
|
@@ -202,26 +141,6 @@ public function testSoftDeletedModelsCanBeRetrievedUsingWithTrashedMethod()
|
202 | 141 | ]);
|
203 | 142 | }
|
204 | 143 |
|
205 |
| - public function testSoftDeletedModelsCanBeRetrievedUsingWithTrashedMethodWithSpecificFunction() |
206 |
| - { |
207 |
| - $user = ImplicitBindingUser::create(['name' => 'Dries']); |
208 |
| - |
209 |
| - $user->delete(); |
210 |
| - |
211 |
| - config(['app.key' => str_repeat('a', 32)]); |
212 |
| - |
213 |
| - Route::resource('users', ImplicitController::class) |
214 |
| - ->middleware(['web']) |
215 |
| - ->withTrashed('show'); |
216 |
| - |
217 |
| - $response = $this->getJson("/users/{$user->id}"); |
218 |
| - |
219 |
| - $response->assertJson([ |
220 |
| - 'id' => $user->id, |
221 |
| - 'name' => $user->name, |
222 |
| - ]); |
223 |
| - } |
224 |
| - |
225 | 144 | public function testEnforceScopingImplicitRouteBindings()
|
226 | 145 | {
|
227 | 146 | $user = ImplicitBindingUser::create(['name' => 'Dries']);
|
|
0 commit comments