branch: externals/phpinspect
commit 14c63e4187ed7221ecc4baa0a2d3fbdd122014d3
Author: Hugo Thunnissen <de...@hugot.nl>
Commit: Hugo Thunnissen <de...@hugot.nl>

    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 4e9b23d193..b547fadc9e 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))))))))

Reply via email to