We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65f9000 commit eb56f6cCopy full SHA for eb56f6c
tests/VirtualColumnTest.php
@@ -146,11 +146,14 @@ public function encrypted_casts_work_with_virtual_column() {
146
'null_value' => null, // 'encrypted'
147
]);
148
149
+ $databaseRecord = json_decode(DB::select('SELECT data FROM my_models')[0]->data);
150
+
151
foreach($encryptedAttributes as $key => $expectedValue) {
152
$savedValue = $model->getAttributes()[$key]; // Encrypted
153
154
if ($savedValue !== null) {
155
$this->assertTrue($model->valueEncrypted($savedValue));
156
+ $this->assertEquals($savedValue, $databaseRecord->$key); // Encrypted in DB
157
$this->assertNotEquals($expectedValue, $savedValue);
158
}
159
0 commit comments