Skip to content

Commit dd5b319

Browse files
committed
Update tests
1 parent 0d422cb commit dd5b319

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

tests/Feature/ClientTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,25 +143,25 @@ public function testIsOverlayRequiredSetsCorrectParameter(): void
143143
$client = $this->client->isOverlayRequired(true);
144144
$options = $client->options();
145145
$this->assertArrayHasKey('isOverlayRequired', $options);
146-
$this->assertSame("true", $options['isOverlayRequired']);
146+
$this->assertSame(true, $options['isOverlayRequired']);
147147

148148
$client = $this->client->isOverlayRequired(false);
149149
$options = $client->options();
150150
$this->assertArrayHasKey('isOverlayRequired', $options);
151-
$this->assertSame("false", $options['isOverlayRequired']);
151+
$this->assertSame(false, $options['isOverlayRequired']);
152152
}
153153

154154
public function testDetectOrientationSetsCorrectParameter(): void
155155
{
156156
$client = $this->client->detectOrientation(true);
157157
$options = $client->options();
158158
$this->assertArrayHasKey('detectOrientation', $options);
159-
$this->assertSame("true", $options['detectOrientation']);
159+
$this->assertSame(true, $options['detectOrientation']);
160160

161161
$client = $this->client->detectOrientation(false);
162162
$options = $client->options();
163163
$this->assertArrayHasKey('detectOrientation', $options);
164-
$this->assertSame("false", $options['detectOrientation']);
164+
$this->assertSame(false, $options['detectOrientation']);
165165
}
166166

167167
#[DataProvider('fileTypeDataProvider')]
@@ -186,51 +186,51 @@ public function testIsCreateSearchablePdfSetsCorrectParameter(): void
186186
$client = $this->client->isCreateSearchablePdf(true);
187187
$options = $client->options();
188188
$this->assertArrayHasKey('isCreateSearchablePdf', $options);
189-
$this->assertSame("true", $options['isCreateSearchablePdf']);
189+
$this->assertSame(true, $options['isCreateSearchablePdf']);
190190

191191
$client = $this->client->isCreateSearchablePdf(false);
192192
$options = $client->options();
193193
$this->assertArrayHasKey('isCreateSearchablePdf', $options);
194-
$this->assertSame("false", $options['isCreateSearchablePdf']);
194+
$this->assertSame(false, $options['isCreateSearchablePdf']);
195195
}
196196

197197
public function testIsSearchablePdfHideTextLayerSetsCorrectParameter(): void
198198
{
199199
$client = $this->client->isSearchablePdfHideTextLayer(true);
200200
$options = $client->options();
201201
$this->assertArrayHasKey('isSearchablePdfHideTextLayer', $options);
202-
$this->assertSame("true", $options['isSearchablePdfHideTextLayer']);
202+
$this->assertSame(true, $options['isSearchablePdfHideTextLayer']);
203203

204204
$client = $this->client->isSearchablePdfHideTextLayer(false);
205205
$options = $client->options();
206206
$this->assertArrayHasKey('isSearchablePdfHideTextLayer', $options);
207-
$this->assertSame("false", $options['isSearchablePdfHideTextLayer']);
207+
$this->assertSame(false, $options['isSearchablePdfHideTextLayer']);
208208
}
209209

210210
public function testScaleSetsCorrectParameter(): void
211211
{
212212
$client = $this->client->scale(true);
213213
$options = $client->options();
214214
$this->assertArrayHasKey('scale', $options);
215-
$this->assertSame("true", $options['scale']);
215+
$this->assertSame(true, $options['scale']);
216216

217217
$client = $this->client->scale(false);
218218
$options = $client->options();
219219
$this->assertArrayHasKey('scale', $options);
220-
$this->assertSame("false", $options['scale']);
220+
$this->assertSame(false, $options['scale']);
221221
}
222222

223223
public function testIsTableSetsCorrectParameter(): void
224224
{
225225
$client = $this->client->isTable(true);
226226
$options = $client->options();
227227
$this->assertArrayHasKey('isTable', $options);
228-
$this->assertSame("true", $options['isTable']);
228+
$this->assertSame(true, $options['isTable']);
229229

230230
$client = $this->client->isTable(false);
231231
$options = $client->options();
232232
$this->assertArrayHasKey('isTable', $options);
233-
$this->assertSame("false", $options['isTable']);
233+
$this->assertSame(false, $options['isTable']);
234234
}
235235

236236
#[DataProvider('engineDataProvider')]
@@ -280,7 +280,7 @@ public function testOptionsReturnsCorrectParameters(): void
280280
$this->assertArrayHasKey('language', $options);
281281
$this->assertSame('ara', $options['language']);
282282
$this->assertArrayHasKey('isOverlayRequired', $options);
283-
$this->assertSame("true", $options['isOverlayRequired']);
283+
$this->assertSame(true, $options['isOverlayRequired']);
284284
$this->assertArrayHasKey('filetype', $options);
285285
$this->assertSame('PDF', $options['filetype']);
286286
$this->assertArrayHasKey('OCREngine', $options);

tests/Unit/CollectionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function testMap(): void
146146
$dataWithKeys = ['a' => 1, 'b' => 2, 'c' => 3];
147147
$collectionWithKeys = new Collection($dataWithKeys);
148148
$mappedCollectionWithKeys = $collectionWithKeys->map(fn ($value, $key) => $value . $key);
149-
$this->assertSame(['1a', '2b', '3c'], $mappedCollectionWithKeys->toArray());
149+
$this->assertSame(['a' => '1a', 'b' => '2b', 'c' => '3c'], $mappedCollectionWithKeys->toArray());
150150
}
151151

152152
public function testFirst(): void

0 commit comments

Comments
 (0)