Skip to content

Commit 9b84e6d

Browse files
committed
add test
1 parent bf0ebd6 commit 9b84e6d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/Integration/Database/EloquentWhereTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,17 @@ public function testSoleFailsIfNoRecords()
158158
$this->assertSame(UserWhereTest::class, $exception->getModel());
159159
}
160160

161+
public function testSoleValue()
162+
{
163+
$expected = UserWhereTest::create([
164+
'name' => 'test-name',
165+
'email' => 'test-email',
166+
'address' => 'test-address',
167+
]);
168+
169+
$this->assertEquals('test-name', UserWhereTest::where('name', 'test-name')->soleValue('name'));
170+
}
171+
161172
public function testChunkMap()
162173
{
163174
UserWhereTest::create([

0 commit comments

Comments
 (0)