()
| 830 | |
| 831 | #[test] |
| 832 | fn finds_existing_docblock() { |
| 833 | let php = "<?php\nclass Foo {\n /**\n * Summary.\n */\n public function bar(): void {\n throw new \\RuntimeException();\n }\n}\n"; |
| 834 | // diag_line = 6 (the throw line) |
| 835 | let info = find_enclosing_docblock(php, 6).unwrap(); |
| 836 | assert!(info.has_docblock); |
| 837 | assert!(info.text.contains("Summary.")); |
| 838 | assert_eq!(info.indent, " "); |
| 839 | } |
| 840 | |
| 841 | #[test] |
| 842 | fn finds_no_docblock() { |
nothing calls this directly
no test coverage detected