Closed HalfBottleOfMind closed 4 months ago
Fantastic, thanks. Could you include some example PHP tests that showcase what you've discussed? Would love to include them in the adapter.
Ok, i'll try to add tests, but i need some time because i'm not familiar with lua and testing in lua
Sorry to bother you, but i think i need some help
How do i run tests? Do i need to do something beside just run ./scripts/test
? Anything preinstall?
I've got E492: Not an editor command: PlenaryBustedFile specs/utils_spec.lua
error when running that file.
And E5108: Error executing lua ...ocal/share/nvim/lazy/plenary.nvim/lua/plenary/busted.lua:267: ./lua/neotest-phpunit/utils.lua:1: module 'neotest.logging' not found
error when executing this command in nvim.
Oh sorry I meant add some example phpunit tests to the tests/
dir
Done
Please pay attention to my first commit, which changes regex It brings the package behavior in line with phpunit, but these may be breaking changes
The test:
#[Test]
public function this_test_should_run()
{
$this->assertTrue(true);
}
Doesn't run for me. It reads like it should
I think there is a problem somewhere in phpunit output parser I'm running attribute marked test through summary and summary says the test is failed although phpunit output says it's ok But if i'm running all tests in file (which contains tests marked with comment) summary says this test was successful
I'm sorry, i don't think i can handle this problem right now
Happy for this to be picked up at a later point in time.
Hello! Just started working with this package and find that it does not find tests marked with attribute. I think this is important since marking with phpdoc is deprecatred by phpunit.
Here is my PR to support attribute marking.
It also contains commit, that fixes test dicovering by method name. Phpunit documentation says that method name should start with 'test', but regex in query hits even if 'test' is in middle of method name.
Thank you!