@veleous You shouldn’t be duplicating any business logic in tests (which is what you’re doing here) regardless where it uses helpers or not. If you copy the logic of how you generate slugs in your test, but then change it in your application code, you’re test is now out of sync.
Instead, test with known values if you want to test how your slugs are generated:
$this->post('/posts', [
'title' => 'A Test Post Title',
]);
// Now check post was created in database with slug value you are expecting...
$this->assertDatabaseHas('posts', [
'title' => 'A Test Post Title',
'slug' => 'a-test-post-title',
]);
You’re no longer duplicating your slug generation logic to your test and instead just asserting the result.