()
| 1391 | |
| 1392 | #[test] |
| 1393 | fn detects_missing_param() { |
| 1394 | let php = r#"<?php |
| 1395 | class Foo { |
| 1396 | /** |
| 1397 | * Does something. |
| 1398 | * |
| 1399 | * @param string $a The first param |
| 1400 | */ |
| 1401 | public function bar(string $a, int $b): void {} |
| 1402 | } |
| 1403 | "#; |
| 1404 | let pos = php.find("@param string").unwrap() as u32; |
| 1405 | let info = find_info(php, pos).unwrap(); |
| 1406 | let cl = no_class_loader(); |
| 1407 | assert!(check_needs_update( |
| 1408 | &info, |
| 1409 | php, |
| 1410 | &[], |
| 1411 | &cl, |
| 1412 | no_function_loader(), |
| 1413 | &HashMap::new(), |
| 1414 | &None, |
| 1415 | )); |
| 1416 | } |
| 1417 | |
| 1418 | #[test] |
| 1419 | fn detects_extra_param() { |
nothing calls this directly
no test coverage detected