Skip to content
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

n+1 tests #185

Merged
merged 3 commits into from
Feb 4, 2023
Merged

n+1 tests #185

merged 3 commits into from
Feb 4, 2023

Conversation

ulcuber
Copy link
Contributor

@ulcuber ulcuber commented Sep 9, 2022

Note:

  • Replaced echo in seeders with command output
  • Deferred seeders registration after resolving seed.handler to prevent errors
  • Updated legacy phpunit.xml

Still cannot reproduce #179

Detected problem: cannot preload rolePermissions and userPermissions. rolePermissions is not relation at all and cannot be preloaded via eager load

echo "\e[32mSeeding:\e[0m DefaultConnectRelationshipsSeeder - Role:Admin attached to Permission:".$permission->slug."\r\n";
$this->command->getOutput()->writeln(
"<info>Seeding:</info> DefaultConnectRelationshipsSeeder - Role:Admin attached to Permission:"
. $permission->slug

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-line function call not indented correctly; expected 16 spaces but found 20

echo "\e[32mSeeding:\e[0m DefaultPermissionitemsTableSeeder - Permission:".$Permissionitem['slug']."\r\n";
$this->command->getOutput()->writeln(
"<info>Seeding:</info> DefaultPermissionitemsTableSeeder - Permission:"
. $Permissionitem['slug']

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Multi-line function call not indented correctly; expected 20 spaces but found 24

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateUsersTable extends Migration

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each class must be in a namespace of at least one level (a top-level vendor name)

}

/** @test */
public function can_preload_roles_on_collection(): void

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name NPlusOneQueriesTest::can_preload_roles_on_collection is not in camel caps format

}

/** @test */
public function can_attach_roles()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name NPlusOneQueriesTest::can_attach_roles is not in camel caps format

}

/** @test */
public function it_caches_roles()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name NPlusOneQueriesTest::it_caches_roles is not in camel caps format

}

/** @test */
public function it_caches_permissions()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name NPlusOneQueriesTest::it_caches_permissions is not in camel caps format

}

/** @test */
public function can_preload_permissions_on_collection(): void

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method name NPlusOneQueriesTest::can_preload_permissions_on_collection is not in camel caps format

@jeremykenedy jeremykenedy merged commit 8c14796 into jeremykenedy:master Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants