zed/extensions
Remco Smits bfdd9d89a7
php: Add runnable tests (#11514)
### This pull request adds the following:
- Missing mapping for the `yield` keyword.
- Outline scheme for `describe`, `it` and `test`
function_call_expressions (to support Pest runnable)
- Pest runnable support
- PHPUnit runnable support
- Task for running selected PHP code.


## Queries explanations

#### Query 1 (PHPUnit: Run specific method test):
1. Class is not abstract (because you cannot run tests from an abstract
class)
2. Class has `Test` suffix
3. Method has public modifier(or no modifiers, default is public)
4. Method has `test` prefix

#### Query 2 (PHPUnit: Run specific method test with `@test`
annotation):
1. Class is not abstract (because you cannot run tests from an abstract
class)
2. Class has `Test` suffix
3. Method has public modifier(or no modifiers, default is public)
4. Method has `@test` annotation

#### Query 3 (PHPUnit: Run specific method test with `#[Test]`
attribute):
1. Class is not abstract (because you cannot run tests from an abstract
class)
2. Class has `Test` suffix
3. Method has public modifier(or no modifiers, default is public)
4. Method has `#[Test]` attribute

#### Query 4 (PHPUnit: Run all tests inside the class):
1. Class is not abstract (because you cannot run tests from an abstract
class)
2. Class has `Test` suffix

#### Query 5 (Pest: Run function test)
1. Function expression has one of the following names: `describe`, `it`
or `test`
2. Function expression first argument is a string

### **PHPUnit: Example for valid test class**
<img width="549" alt="Screenshot 2024-05-08 at 10 41 34"
src="https://github.com/zed-industries/zed/assets/62463826/e84269de-4f53-410b-b93b-713f9448dc79">


### **PHPUnit: Example for invalid test class**
All the methods should be ignored because you cannot run tests on an
abstract class.
<img width="608" alt="Screenshot 2024-05-07 at 22 28 57"
src="https://github.com/zed-industries/zed/assets/62463826/8c6b3921-5266-4d88-ada5-5cd827bcf242">

### **Pest: Example**

https://github.com/zed-industries/zed/assets/62463826/bce133eb-0a6f-4ca2-9739-12d9169bb9d6

You should now see all your **Pest** tests inside the buffer symbols
modal.
![Screenshot 2024-05-08 at 22 51
25](https://github.com/zed-industries/zed/assets/62463826/9c818b74-383c-45e5-9b41-8dec92759a14)

Release Notes:

- Added test runnable detection for PHP (PHPUnit & Pest).
- Added task for running selected PHP code.
- Added `describe`, `test` and `it` functions to buffer symbols, to
support Pest runnable.
- Added `yield` keyword to PHP keyword mapping.
2024-05-22 13:49:20 +02:00
..
astro astro: Bump to v0.0.2 (#11834) 2024-05-14 19:12:43 -04:00
clojure Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
csharp csharp: Bump to v0.0.2 (#10651) 2024-04-16 15:49:16 -04:00
dart dart: Bump to v0.0.2 (#10940) 2024-04-24 13:03:56 -04:00
deno Extract Deno extension (#10912) 2024-04-23 20:44:11 -04:00
elixir elixir: Bump to v0.0.4 (#11446) 2024-05-06 12:41:50 -04:00
elm Extract Elm language into an extension (#10432) 2024-04-11 10:23:49 -07:00
emmet emmet: release 0.0.3 (#11873) 2024-05-15 21:27:37 +02:00
erlang Extract Erlang support into an extension (#9974) 2024-03-29 18:03:38 -04:00
gleam gleam: Bump to v0.1.3 (#12000) 2024-05-17 16:31:01 -04:00
glsl glsl: Bump to v0.1.0 (#10734) 2024-04-18 11:57:21 -04:00
haskell haskell: Bump to v0.1.0 (#10378) 2024-04-10 15:42:46 -04:00
html html: Bump to 0.1.1 (#12093) 2024-05-21 18:36:47 +02:00
lua Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
ocaml Add xtask for finding crates with missing licenses (#11776) 2024-05-13 18:52:12 -04:00
php php: Add runnable tests (#11514) 2024-05-22 13:49:20 +02:00
prisma prisma: Bump to v0.0.2 (#10689) 2024-04-17 12:40:01 -04:00
purescript
racket Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
ruby ruby: Bump to v0.0.4 (#12101) 2024-05-21 15:28:44 -04:00
scheme Clean up whitespace (#10755) 2024-04-23 13:31:21 -04:00
svelte Use v0.0.6 of the zed_extension_api for extensions that need it (#10324) 2024-04-09 10:57:26 -04:00
terraform terraform: Sync Cargo.toml version with extension.toml version (#10937) 2024-04-24 11:42:18 -04:00
toml toml: Bump to v0.1.1 (#11359) 2024-05-03 11:29:53 -04:00
uiua Update extension descriptions (#9939) 2024-03-28 17:14:55 -04:00
vue vue: Bump to v0.0.2 (#11747) 2024-05-13 08:49:40 -04:00
zig zig: Bump to v0.1.2 (#11447) 2024-05-06 12:47:16 -04:00
.gitignore