@@ -63,8 +63,8 @@ protected function setUp(): void
6363 for ($ i = 0 ; $ i < 10 ; ++$ i ) {
6464 $ resource = new JsonStreamResource ();
6565 $ resource ->title = 'Title ' .$ i ;
66- // $resource->createdAt = new \DateTimeImmutable();
67- // $resource->publishedAt = new \DateTimeImmutable();
66+ $ resource ->createdAt = new \DateTimeImmutable ();
67+ $ resource ->publishedAt = new \DateTimeImmutable ();
6868 $ resource ->views = random_int (1 , 1000 );
6969 $ resource ->rating = random_int (1 , 5 );
7070 $ resource ->isFeatured = (bool ) random_int (0 , 1 );
@@ -171,6 +171,8 @@ public function testJsonStreamerWrite(): void
171171 'json ' => [
172172 'title ' => 'asd ' ,
173173 'views ' => 0 ,
174+ 'createdAt ' => '2024-01-01T12:00:00+00:00 ' ,
175+ 'publishedAt ' => '2024-01-01T12:00:00+00:00 ' ,
174176 'rating ' => 0.0 ,
175177 'isFeatured ' => false ,
176178 'price ' => '0.00 ' ,
@@ -181,6 +183,7 @@ public function testJsonStreamerWrite(): void
181183
182184 $ res = json_decode ($ buffer , true );
183185
186+ $ this ->assertResponseIsSuccessful ();
184187 $ this ->assertSame ('asd ' , $ res ['title ' ]);
185188 $ this ->assertSame (0 , $ res ['views ' ]);
186189 $ this ->assertSame (0 , $ res ['rating ' ]);
0 commit comments