File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
lib/internal/Magento/Framework/Code/Test/Unit/Reader Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,27 @@ public function testGetParents()
60
60
);
61
61
}
62
62
63
+ /**
64
+ * Check that while processing nonexistent argument of constructor exception message contains original class name
65
+ */
66
+ public function testGetConstructorWithNonexistentDependency ()
67
+ {
68
+ $ testClass = new class {
69
+ private $ arg ;
70
+
71
+ // phpstan:ignore
72
+ public function __construct (?\NonexistentDependency $ arg = null )
73
+ {
74
+ $ this ->arg = $ arg ;
75
+ }
76
+ };
77
+
78
+ $ className = get_class ($ testClass );
79
+ $ this ->expectException (\ReflectionException::class);
80
+ $ this ->expectExceptionMessage ($ className );
81
+ $ this ->model ->getConstructor ($ className );
82
+ }
83
+
63
84
/**
64
85
* Data provider
65
86
*
You can’t perform that action at this time.
0 commit comments