IDE Navigation Reference
TestLink's core purpose is enabling Cmd+Click navigation between tests and production code. This page covers IDE-specific details and troubleshooting.
How Navigation Works
TestLink uses @see tags that all major PHP IDEs recognize:
class UserService
{
/**
* @see \Tests\UserServiceTest::test_creates_user ← Cmd+Click
* @see \Tests\UserServiceTest::test_validates_email ← Cmd+Click
*/
public function create(array $data): User
{
// Click any @see tag to jump to that test
}
}The same works from tests to production:
/**
* @see \App\Services\UserService::create ← Cmd+Click
*/
public function test_creates_user(): void
{
// Click to jump to the production method
}PhpStorm
PhpStorm supports @see navigation out of the box. No configuration needed.
Navigate
- Hold
Cmd(Mac) orCtrl(Windows/Linux) - Click on the class or method reference in the
@seetag - PhpStorm jumps to that location
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Navigate to definition | Cmd+Click or Cmd+B |
| Find usages | Cmd+Shift+F7 |
| Navigate back | Cmd+[ |
Troubleshooting
@see links not clickable:
- Ensure the class is fully qualified (
\Tests\...with leading backslash) - Run
composer dump-autoloadto update autoloading - Invalidate caches: File → Invalidate Caches → Invalidate and Restart
Wrong file opens:
- Check the namespace matches the file location
- Verify the method name is spelled correctly
VS Code
VS Code requires the Intelephense extension for @see navigation.
Setup
- Open Extensions (
Cmd+Shift+X) - Search for "PHP Intelephense"
- Click Install
Optional configuration in .vscode/settings.json:
{
"intelephense.files.associations": ["*.php"],
"intelephense.environment.includePaths": [
"${workspaceFolder}/vendor"
]
}Navigate
- Hold
Cmd(Mac) orCtrl(Windows/Linux) - Click on the
@seereference - VS Code jumps to the target
Keyboard Shortcuts
| Action | Shortcut |
|---|---|
| Navigate to definition | Cmd+Click or F12 |
| Navigate back | Cmd+- |
Other IDEs
| IDE | @see Support |
|---|---|
| Sublime Text | With LSP-intelephense plugin |
| Neovim | With nvim-lspconfig + intelephense |
| Eclipse PDT | Built-in |
Generating @see Tags
TestLink's sync command generates @see tags automatically:
./vendor/bin/testlink syncThis scans your test declarations and adds corresponding @see tags to both sides, making your code navigable without manual work.
@see Tag Format
Fully Qualified Names Required
Always use fully qualified class names (FQCN) with a leading backslash:
// Good - navigable in all IDEs
/** @see \Tests\Unit\UserServiceTest::test_creates_user */
// Bad - may not work in some IDEs
/** @see UserServiceTest::test_creates_user */Class References
/** @see \App\Services\UserService */Method References
/** @see \App\Services\UserService::create */Multiple References
/**
* @see \Tests\UserServiceTest::test_creates_user
* @see \Tests\UserServiceTest::test_validates_email
* @see \Tests\UserFlowTest::test_registration_flow
*/
public function create(array $data): UserKeeping Links Accurate
Navigation only works if links point to real code. Run validation to catch broken links:
./vendor/bin/testlink validateThis catches:
- Misspelled class/method names
- References to deleted tests
- Missing FQCN prefixes
Run validation in CI/CD to ensure your navigation links stay accurate as code evolves.
See Also
- Bidirectional Linking - How the linking system works
- Sync Command - Auto-generate @see tags
- Validation in CI - Keep links accurate