-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Added test for custom key name
Added test media model with custom key name, migration to alter media table with custom key name and test to rename files on a model with custom key name
- Loading branch information
1 parent
d7e28eb
commit 3bd4db4
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
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
12 changes: 12 additions & 0 deletions
12
tests/TestSupport/TestModels/TestCustomMediaWithCustomKeyName.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Spatie\MediaLibrary\Tests\TestSupport\TestModels; | ||
|
||
use Spatie\MediaLibrary\MediaCollections\Models\Media; | ||
|
||
class TestCustomMediaWithCustomKeyName extends Media | ||
{ | ||
protected $table = 'media'; | ||
|
||
protected $primaryKey = 'custom_key_id'; | ||
} |