File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 10
10
use Illuminate \Http \Request ;
11
11
use Illuminate \Http \Resources \Json \AnonymousResourceCollection ;
12
12
13
- class QuestionsGetController extends Controller
13
+ class QuestionsIndexController extends Controller
14
14
{
15
15
protected Question $ question ;
16
16
Original file line number Diff line number Diff line change 10
10
use Laravel \Lumen \Testing \DatabaseMigrations ;
11
11
use Tests \TestCase ;
12
12
13
- class QuestionsGetTest extends TestCase
13
+ class QuestionsIndexTest extends TestCase
14
14
{
15
15
use DatabaseMigrations;
16
16
@@ -28,7 +28,7 @@ protected function setUp(): void
28
28
public function it_list_non_deleted_question (): void
29
29
{
30
30
$ deleteQuestion = QuestionFactory::new ([
31
- 'deleted_at ' => Carbon::now ()-> toDateString () ,
31
+ 'deleted_at ' => Carbon::now (),
32
32
])
33
33
->create ();
34
34
@@ -138,11 +138,11 @@ public function it_search_by_title(): void
138
138
public function it_search_by_created_date (): void
139
139
{
140
140
QuestionFactory::new ([
141
- 'created_at ' => Carbon::now ()->subYears (2 )-> toDateString () ,
141
+ 'created_at ' => Carbon::now ()->subYears (2 ),
142
142
])
143
143
->create ();
144
144
QuestionFactory::new ([
145
- 'created_at ' => Carbon::now ()->subYears (3 )-> toDateString () ,
145
+ 'created_at ' => Carbon::now ()->subYears (3 ),
146
146
])
147
147
->create ();
148
148
@@ -167,7 +167,7 @@ public function it_search_by_created_date(): void
167
167
public function it_search_by_resolved (): void
168
168
{
169
169
QuestionFactory::new ([
170
- 'resolved_at ' => Carbon::now ()-> toDateString () ,
170
+ 'resolved_at ' => Carbon::now (),
171
171
])
172
172
->count (5 )
173
173
->create ();
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
use Domains \Discussions \Controllers \AnswersStoreController ;
4
- use Domains \Discussions \Controllers \QuestionsGetController ;
4
+ use Domains \Discussions \Controllers \QuestionsIndexController ;
5
5
use Domains \Discussions \Controllers \QuestionsStoreController ;
6
6
use Domains \Discussions \Controllers \QuestionsUpdateController ;
7
7
use Domains \Discussions \Controllers \QuestionsViewController ;
26
26
27
27
Route::get ('questions ' , [
28
28
'as ' => 'questions.index ' ,
29
- 'uses ' => QuestionsGetController ::class
29
+ 'uses ' => QuestionsIndexController ::class
30
30
]);
31
31
32
32
Route::get ('questions/{questionId} ' , [
You can’t perform that action at this time.
0 commit comments