Skip to content

Commit d6f593e

Browse files
authored
DOCSP-49784: View file typo (#3376) (#3378)
* DOCSP-49784: View file typo (#3376) (cherry picked from commit 0dc4a99) * fix test
1 parent d56aefa commit d6f593e

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

docs/quick-start/view-data.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ View MongoDB Data
105105
.. code-block:: none
106106
:copyable: false
107107

108-
INFO View [resources/views/browse_movie.blade.php] created successfully.
108+
INFO View [resources/views/browse_movies.blade.php] created successfully.
109109

110-
Open the ``browse_movie.blade.php`` view file in the ``resources/views``
110+
Open the ``browse_movies.blade.php`` view file in the ``resources/views``
111111
directory. Replace the contents with the following code and save the
112112
changes:
113113

@@ -141,7 +141,7 @@ View MongoDB Data
141141

142142
.. step:: Optionally, view your results as JSON documents
143143

144-
Rather than generating a view and editing the ``browse_movie.blade.php`` file, you can
144+
Rather than generating a view and editing the ``browse_movies.blade.php`` file, you can
145145
use the ``toJson()`` method to display your results in JSON format.
146146

147147
Replace the ``show()`` function with the following code to retrieve results and

tests/QueueTest.php

+11-12
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use MongoDB\Laravel\Queue\MongoQueue;
1616

1717
use function app;
18-
use function json_encode;
18+
use function json_decode;
1919

2020
class QueueTest extends TestCase
2121
{
@@ -42,17 +42,16 @@ public function testQueueJobLifeCycle(): void
4242
$job = Queue::pop('test');
4343
$this->assertInstanceOf(MongoJob::class, $job);
4444
$this->assertEquals(1, $job->isReserved());
45-
$this->assertEquals(json_encode([
46-
'uuid' => $uuid,
47-
'displayName' => 'test',
48-
'job' => 'test',
49-
'maxTries' => null,
50-
'maxExceptions' => null,
51-
'failOnTimeout' => false,
52-
'backoff' => null,
53-
'timeout' => null,
54-
'data' => ['action' => 'QueueJobLifeCycle'],
55-
]), $job->getRawBody());
45+
$payload = json_decode($job->getRawBody(), true);
46+
$this->assertEquals($uuid, $payload['uuid']);
47+
$this->assertEquals('test', $payload['displayName']);
48+
$this->assertEquals('test', $payload['job']);
49+
$this->assertNull($payload['maxTries']);
50+
$this->assertNull($payload['maxExceptions']);
51+
$this->assertFalse($payload['failOnTimeout']);
52+
$this->assertNull($payload['backoff']);
53+
$this->assertNull($payload['timeout']);
54+
$this->assertEquals(['action' => 'QueueJobLifeCycle'], $payload['data']);
5655

5756
// Remove reserved job
5857
$job->delete();

0 commit comments

Comments
 (0)