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
Testing nearest doesn't always work #76
Comments
Hey. This doesn't seem to completely solve the issue. While is fixes the cases where "Test Nearest" doesn't run at all, it still causes "Test Nearest" to run all tests in the file, no matter where the cursor is. |
I can't reproduce that. If you could enable debug mode and provide some of the messages. Also:
You can those from the debug log ( To enable the debug messages set environment variable
See https://github.com/gerardroche/sublime-phpunit#debugging That'll give extra verbose debug messages about what PHPUnitKit is doing. |
Are you using the php-grammar package? |
I can confirm there's an issue with compatibility with php-grammar. So if you're using that package, then you don't need to provide the debug log. I'll try get a fix for that shortly. |
Hey, I am indeed using your php-grammar package. I can confirm everything works fine without that package. Thanks! And thanks for this awesome package. It makes testing such a joy in ST. The only thing I'm missing would be to run "test nearest" with the cursor anywhere inside a test method and not just on the method name. |
That's actually supported using the default PHP package i.e. php-grammar doesn't support it. php-grammar uses a custom PHP syntax and it has diverged from the default PHP package syntax. The intention is to remove that custom syntax from php-grammar and for the package to use the default package syntax instead. I just haven't got around doing that. Hopefully I'll get some time to do it. |
Good to know.. I guess I'll use the default package in favor of easier testing for a while. Is there an issue on php-grammar that I can track? |
I don't have it down 100%, yet but it seems if the test has or overrides a setUp() method, running the "nearest" test stops working. I don't have a good example right now, but there is a tutorial available where this happens:
Now open Sublime Text and try to run "nearest" in tests/Feature/CreateThreadsTest.php. It will either run all tests (happens at the beginning of the file) or not run at all (further down).
The text was updated successfully, but these errors were encountered: