From 14c63e4187ed7221ecc4baa0a2d3fbdd122014d3 Mon Sep 17 00:00:00 2001 From: Hugo Thunnissen Date: Fri, 16 Aug 2024 18:29:44 +0200 Subject: [PATCH] Improve method return-type test --- test/test-index.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/test-index.el b/test/test-index.el index 4e9b23d..b547fad 100644 --- a/test/test-index.el +++ b/test/test-index.el @@ -376,11 +376,14 @@ public function doStuff() }") (phpinspect-project-add-index project (phpinspect-index-current-buffer)) - (let ((class (phpinspect-project-get-class - project - (phpinspect--make-type + (let* ((type (phpinspect--make-type :name "\\App\\Controller\\Api\\V1\\AccountStatisticsController" - :fully-qualified t)))) + :fully-qualified t)) + (class (phpinspect-project-get-class project type))) + (should class) - (should (phpinspect--class-get-method class "doStuff")))))) + (let ((method (phpinspect--class-get-method class "doStuff"))) + (should method) + (should (phpinspect--function-return-type method)) + (should (phpinspect--type= type (phpinspect--function-return-type method))))))))