hhvm / hacktest

A unit testing framework for Hack
MIT License
29 stars 13 forks source link

Migrate PhpUnit to Hacktest methods that start with `should` instead of `test`. #61

Closed danon closed 5 years ago

danon commented 5 years ago

My all tests in PhpUnit start with should instead of test, and they also have @test annotation.

Is there a way I can use your migrate tool?

fredemmott commented 5 years ago

It would probably be easiest to use sed or IDE global find-and-replace to replace function should with function test, or function testThat (whatever makes sense for hte majority of your function names), then use the migration tool

danon commented 5 years ago

Yea, you night not believe, but I've already thought about that.

So, your answer is no?

fredemmott commented 5 years ago

No, the migration does not currently support this.

Feel free to file an issue or send a pull request over at https://github.com/hhvm/hhast to add support for renaming @test methods to start with test