-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add model generator tests #70
base: master
Are you sure you want to change the base?
Conversation
# Conflicts: # tests/ControllerGeneratorTest.php # tests/NovaResourceGeneratorTest.php # tests/NovaTestGeneratorTest.php # tests/Support/Controller/ControllerMockTrait.php # tests/Support/NovaResource/NovaResourceMockTrait.php # tests/Support/NovaTest/NovaTestMockTrait.php # tests/Support/Shared/GeneratorMockTrait.php # tests/TestCase.php
…erator-tests # Conflicts: # tests/Support/Factory/FactoryMockTrait.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please change target branch and merge it with the current master
@@ -60,8 +60,8 @@ public function prepareRelatedModels(): void | |||
if (!$this->classExists('models', $relation)) { | |||
$this->throwFailureException( | |||
ClassNotExistsException::class, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add arg names for multiline style
]); | ||
} | ||
|
||
public function mockGeneratorForMissingRelationModel(): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems this method is not using
{ | ||
return $this->hasOne(Comment::class); | ||
} | ||
public function users() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check why no empty line between relations
{ | ||
return $this->hasMany(User::class); | ||
} | ||
protected $casts = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we change casts
place after the hidden property
{ | ||
public function some_relation() | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue #49