Add missing tables and test for model table existence #2953
Conversation
cc8b783
to
8c00798
otherwise laravel will try incompatible defaults :D
tests/TableTest.php
Outdated
private function checkDir(string $basePath, string $namespace = '') | ||
{ | ||
$errors = []; | ||
$entries = scandir($basePath); |
nanaya
Apr 10, 2018
Collaborator
There's this File::allFiles()
.
There's this File::allFiles()
.
tests/TableTest.php
Outdated
$errors = $this->checkDir($this->modelsPath); | ||
|
||
// prints a diff with the classes that errored. | ||
$this->assertEquals([], $errors); |
nanaya
Apr 10, 2018
Collaborator
Probably should use assertSame
.
Probably should use assertSame
.
Might as well since it's already a dependency of other packages
tests/TableTest.php
Outdated
{ | ||
$errors = []; | ||
|
||
$files = (new Finder)->in(app_path().'/Models')->files(); |
nanaya
Apr 12, 2018
Collaborator
Why don't just use the File
thingy from laravel? ?_?
Why don't just use the File
thingy from laravel? ?_?
notbakaneko
Apr 12, 2018
Author
Collaborator
It's a wrapper around Finder
anyway ┐(ツ)┌
It's a wrapper around Finder
anyway ┐(ツ)┌
composer.json
Outdated
@@ -37,6 +37,7 @@ | |||
"paypal/rest-api-sdk-php": "*", | |||
"predis/predis": "~1.0", | |||
"sentry/sentry-laravel": "*", | |||
"symfony/finder": "*", |
nanaya
Apr 12, 2018
Collaborator
this probably isn't needed. If laravel changes the return, it'll explode in different way anyway and this wouldn't help ┐(°~° )┌
this probably isn't needed. If laravel changes the return, it'll explode in different way anyway and this wouldn't help ┐(°~° )┌
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
No description provided.