File tree Expand file tree Collapse file tree 1 file changed +84
-0
lines changed Expand file tree Collapse file tree 1 file changed +84
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,76 @@ public static function provideFunctionNames(): Generator
60
60
'toMql ' ,
61
61
Builder::class,
62
62
];
63
+
64
+ yield 'average ' => [
65
+ 'average ' ,
66
+ Builder::class,
67
+ ['name ' ],
68
+ ];
69
+
70
+ yield 'avg ' => [
71
+ 'avg ' ,
72
+ Builder::class,
73
+ ['name ' ],
74
+ ];
75
+
76
+ yield 'count ' => [
77
+ 'count ' ,
78
+ Builder::class,
79
+ ['name ' ],
80
+ ];
81
+
82
+ yield 'exists ' => [
83
+ 'exists ' ,
84
+ Builder::class,
85
+ ];
86
+
87
+ yield 'insert ' => [
88
+ 'insert ' ,
89
+ Builder::class,
90
+ [['name ' ]],
91
+ ];
92
+
93
+ yield 'max ' => [
94
+ 'max ' ,
95
+ Builder::class,
96
+ ['name ' ],
97
+ ];
98
+
99
+ yield 'min ' => [
100
+ 'min ' ,
101
+ Builder::class,
102
+ ['name ' ],
103
+ ];
104
+
105
+ yield 'pluck ' => [
106
+ 'pluck ' ,
107
+ Builder::class,
108
+ ['name ' ],
109
+ ];
110
+
111
+ yield 'pull ' => [
112
+ 'pull ' ,
113
+ Builder::class,
114
+ ['name ' ],
115
+ ];
116
+
117
+ yield 'push ' => [
118
+ 'push ' ,
119
+ Builder::class,
120
+ ['name ' ],
121
+ ];
122
+
123
+ yield 'raw ' => [
124
+ 'raw ' ,
125
+ Builder::class,
126
+ ];
127
+
128
+ yield 'sum ' => [
129
+ 'sum ' ,
130
+ Builder::class,
131
+ ['name ' ],
132
+ ];
63
133
}
64
134
65
135
#[Test]
@@ -97,5 +167,19 @@ public static function provideUnsupportedMethods(): Generator
97
167
'This method is not supported by MongoDB. Try "toMql()" instead ' ,
98
168
[[['name ' => 'Jane ' ]], fn (QueryBuilder $ builder ) => $ builder ],
99
169
];
170
+
171
+ yield 'dd ' => [
172
+ 'dd ' ,
173
+ BadMethodCallException::class,
174
+ 'This method is not supported by MongoDB. Try "toMql()" instead ' ,
175
+ [[['name ' => 'Jane ' ]], fn (QueryBuilder $ builder ) => $ builder ],
176
+ ];
177
+
178
+ yield 'dump ' => [
179
+ 'dump ' ,
180
+ BadMethodCallException::class,
181
+ 'This method is not supported by MongoDB. Try "toMql()" instead ' ,
182
+ [[['name ' => 'Jane ' ]], fn (QueryBuilder $ builder ) => $ builder ],
183
+ ];
100
184
}
101
185
}
You can’t perform that action at this time.
0 commit comments