Created
December 16, 2021 11:02
-
-
Save G3z/fa3e5d476e23dd4b495c92e51f66c259 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class RelationsTest extends TestFeatureCase | |
{ | |
public function testSearchColumnsWithScope() | |
{ | |
$user = $this->users->random(); | |
$params = [ | |
'search' => $user->email, | |
'model' => Crypt::encryptString(EmptyUserModel::class), | |
'name' => Crypt::encryptString('name'), | |
'key' => Crypt::encryptString('id'), | |
'searchColumns' => Crypt::encrypt(['email', 'name']), | |
'scope' => Crypt::encrypt([ | |
'name' => 'asFilerId', | |
'parameters' => [$user->id], | |
]), | |
'append' => Crypt::encryptString('full'), | |
]; | |
$response = $this | |
->actingAs($this->createAdminUser()) | |
->post(route('platform.systems.relation'), $params); | |
$response->assertJson([ | |
$user->id => $user->name.' ('.$user->email.')', | |
]); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment