File tree Expand file tree Collapse file tree 18 files changed +90
-45
lines changed
tests/Unit/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions Expand file tree Collapse file tree 18 files changed +90
-45
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,8 @@ protected function getDqlStatements(): array
4343 ];
4444 }
4545
46- public function test_too_few_arguments_throws_exception (): void
46+ #[Test]
47+ public function too_few_arguments_throws_exception (): void
4748 {
4849 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
4950 $ this ->expectExceptionMessage ('array_position() requires at least 2 arguments ' );
@@ -52,7 +53,8 @@ public function test_too_few_arguments_throws_exception(): void
5253 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5354 }
5455
55- public function test_too_many_arguments_throws_exception (): void
56+ #[Test]
57+ public function too_many_arguments_throws_exception (): void
5658 {
5759 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5860 $ this ->expectExceptionMessage ('array_position() requires between 2 and 3 arguments ' );
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ protected function getDqlStatements(): array
4040 ];
4141 }
4242
43- public function test_invalid_boolean_throws_exception (): void
43+ #[Test]
44+ public function invalid_boolean_throws_exception (): void
4445 {
4546 $ this ->expectException (InvalidBooleanException::class);
4647 $ this ->expectExceptionMessage ('Invalid boolean value "invalid" provided for array_to_json. Must be "true" or "false". ' );
@@ -49,7 +50,8 @@ public function test_invalid_boolean_throws_exception(): void
4950 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5051 }
5152
52- public function test_too_many_arguments_throws_exception (): void
53+ #[Test]
54+ public function too_many_arguments_throws_exception (): void
5355 {
5456 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5557 $ this ->expectExceptionMessage ('array_to_json() requires between 1 and 2 arguments ' );
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ protected function getDqlStatements(): array
4444 ];
4545 }
4646
47- public function test_invalid_timezone_throws_exception (): void
47+ #[Test]
48+ public function invalid_timezone_throws_exception (): void
4849 {
4950 $ this ->expectException (InvalidTimezoneException::class);
5051 $ this ->expectExceptionMessage ('Invalid timezone "Invalid/Timezone" provided for date_add ' );
@@ -53,7 +54,8 @@ public function test_invalid_timezone_throws_exception(): void
5354 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5455 }
5556
56- public function test_too_few_arguments_throws_exception (): void
57+ #[Test]
58+ public function too_few_arguments_throws_exception (): void
5759 {
5860 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5961 $ this ->expectExceptionMessage ('date_add() requires at least 2 arguments ' );
@@ -62,7 +64,8 @@ public function test_too_few_arguments_throws_exception(): void
6264 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
6365 }
6466
65- public function test_too_many_arguments_throws_exception (): void
67+ #[Test]
68+ public function too_many_arguments_throws_exception (): void
6669 {
6770 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
6871 $ this ->expectExceptionMessage ('date_add() requires between 2 and 3 arguments ' );
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ protected function getDqlStatements(): array
4242 ];
4343 }
4444
45- public function test_invalid_timezone_throws_exception (): void
45+ #[Test]
46+ public function invalid_timezone_throws_exception (): void
4647 {
4748 $ this ->expectException (InvalidTimezoneException::class);
4849 $ this ->expectExceptionMessage ('Invalid timezone "Invalid/Timezone" provided for date_subtract ' );
@@ -51,7 +52,8 @@ public function test_invalid_timezone_throws_exception(): void
5152 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5253 }
5354
54- public function test_too_few_arguments_throws_exception (): void
55+ #[Test]
56+ public function too_few_arguments_throws_exception (): void
5557 {
5658 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5759 $ this ->expectExceptionMessage ('date_subtract() requires at least 2 arguments ' );
@@ -60,7 +62,8 @@ public function test_too_few_arguments_throws_exception(): void
6062 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
6163 }
6264
63- public function test_too_many_arguments_throws_exception (): void
65+ #[Test]
66+ public function too_many_arguments_throws_exception (): void
6467 {
6568 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
6669 $ this ->expectExceptionMessage ('date_subtract() requires between 2 and 3 arguments ' );
Original file line number Diff line number Diff line change @@ -34,7 +34,8 @@ protected function getDqlStatements(): array
3434 ];
3535 }
3636
37- public function test_invalid_boolean_throws_exception (): void
37+ #[Test]
38+ public function invalid_boolean_throws_exception (): void
3839 {
3940 $ this ->expectException (InvalidBooleanException::class);
4041 $ this ->expectExceptionMessage ('Invalid boolean value "invalid" provided for jsonb_insert. Must be "true" or "false". ' );
@@ -43,7 +44,8 @@ public function test_invalid_boolean_throws_exception(): void
4344 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
4445 }
4546
46- public function test_too_few_arguments_throws_exception (): void
47+ #[Test]
48+ public function too_few_arguments_throws_exception (): void
4749 {
4850 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
4951 $ this ->expectExceptionMessage ('jsonb_insert() requires at least 3 arguments ' );
@@ -52,7 +54,8 @@ public function test_too_few_arguments_throws_exception(): void
5254 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5355 }
5456
55- public function test_too_many_arguments_throws_exception (): void
57+ #[Test]
58+ public function too_many_arguments_throws_exception (): void
5659 {
5760 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5861 $ this ->expectExceptionMessage ('jsonb_insert() requires between 3 and 4 arguments ' );
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ protected function getDqlStatements(): array
4444 ];
4545 }
4646
47- public function test_invalid_boolean_throws_exception (): void
47+ #[Test]
48+ public function invalid_boolean_throws_exception (): void
4849 {
4950 $ this ->expectException (InvalidBooleanException::class);
5051 $ this ->expectExceptionMessage ('Invalid boolean value "invalid" provided for jsonb_path_exists. Must be "true" or "false". ' );
@@ -53,7 +54,8 @@ public function test_invalid_boolean_throws_exception(): void
5354 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5455 }
5556
56- public function test_too_few_arguments_throws_exception (): void
57+ #[Test]
58+ public function too_few_arguments_throws_exception (): void
5759 {
5860 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5961 $ this ->expectExceptionMessage ('jsonb_path_exists() requires at least 2 arguments ' );
@@ -62,7 +64,8 @@ public function test_too_few_arguments_throws_exception(): void
6264 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
6365 }
6466
65- public function test_too_many_arguments_throws_exception (): void
67+ #[Test]
68+ public function too_many_arguments_throws_exception (): void
6669 {
6770 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
6871 $ this ->expectExceptionMessage ('jsonb_path_exists() requires between 2 and 4 arguments ' );
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ protected function getDqlStatements(): array
4444 ];
4545 }
4646
47- public function test_invalid_boolean_throws_exception (): void
47+ #[Test]
48+ public function invalid_boolean_throws_exception (): void
4849 {
4950 $ this ->expectException (InvalidBooleanException::class);
5051 $ this ->expectExceptionMessage ('Invalid boolean value "invalid" provided for jsonb_path_match. Must be "true" or "false". ' );
@@ -53,7 +54,8 @@ public function test_invalid_boolean_throws_exception(): void
5354 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5455 }
5556
56- public function test_too_few_arguments_throws_exception (): void
57+ #[Test]
58+ public function too_few_arguments_throws_exception (): void
5759 {
5860 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5961 $ this ->expectExceptionMessage ('jsonb_path_match() requires at least 2 arguments ' );
@@ -62,7 +64,8 @@ public function test_too_few_arguments_throws_exception(): void
6264 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
6365 }
6466
65- public function test_too_many_arguments_throws_exception (): void
67+ #[Test]
68+ public function too_many_arguments_throws_exception (): void
6669 {
6770 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
6871 $ this ->expectExceptionMessage ('jsonb_path_match() requires between 2 and 4 arguments ' );
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ protected function getDqlStatements(): array
4444 ];
4545 }
4646
47- public function test_invalid_boolean_throws_exception (): void
47+ #[Test]
48+ public function invalid_boolean_throws_exception (): void
4849 {
4950 $ this ->expectException (InvalidBooleanException::class);
5051 $ this ->expectExceptionMessage ('Invalid boolean value "invalid" provided for jsonb_path_query_array. Must be "true" or "false". ' );
@@ -53,7 +54,8 @@ public function test_invalid_boolean_throws_exception(): void
5354 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5455 }
5556
56- public function test_too_few_arguments_throws_exception (): void
57+ #[Test]
58+ public function too_few_arguments_throws_exception (): void
5759 {
5860 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5961 $ this ->expectExceptionMessage ('jsonb_path_query_array() requires at least 2 arguments ' );
@@ -62,7 +64,8 @@ public function test_too_few_arguments_throws_exception(): void
6264 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
6365 }
6466
65- public function test_too_many_arguments_throws_exception (): void
67+ #[Test]
68+ public function too_many_arguments_throws_exception (): void
6669 {
6770 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
6871 $ this ->expectExceptionMessage ('jsonb_path_query_array() requires between 2 and 4 arguments ' );
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ protected function getDqlStatements(): array
4444 ];
4545 }
4646
47- public function test_invalid_boolean_throws_exception (): void
47+ #[Test]
48+ public function invalid_boolean_throws_exception (): void
4849 {
4950 $ this ->expectException (InvalidBooleanException::class);
5051 $ this ->expectExceptionMessage ('Invalid boolean value "invalid" provided for jsonb_path_query_first. Must be "true" or "false". ' );
@@ -53,7 +54,8 @@ public function test_invalid_boolean_throws_exception(): void
5354 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5455 }
5556
56- public function test_too_few_arguments_throws_exception (): void
57+ #[Test]
58+ public function too_few_arguments_throws_exception (): void
5759 {
5860 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5961 $ this ->expectExceptionMessage ('jsonb_path_query_first() requires at least 2 arguments ' );
@@ -62,7 +64,8 @@ public function test_too_few_arguments_throws_exception(): void
6264 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
6365 }
6466
65- public function test_too_many_arguments_throws_exception (): void
67+ #[Test]
68+ public function too_many_arguments_throws_exception (): void
6669 {
6770 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
6871 $ this ->expectExceptionMessage ('jsonb_path_query_first() requires between 2 and 4 arguments ' );
Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ protected function getDqlStatements(): array
4444 ];
4545 }
4646
47- public function test_invalid_boolean_throws_exception (): void
47+ #[Test]
48+ public function invalid_boolean_throws_exception (): void
4849 {
4950 $ this ->expectException (InvalidBooleanException::class);
5051 $ this ->expectExceptionMessage ('Invalid boolean value "invalid" provided for jsonb_path_query. Must be "true" or "false". ' );
@@ -53,7 +54,8 @@ public function test_invalid_boolean_throws_exception(): void
5354 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
5455 }
5556
56- public function test_too_few_arguments_throws_exception (): void
57+ #[Test]
58+ public function too_few_arguments_throws_exception (): void
5759 {
5860 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
5961 $ this ->expectExceptionMessage ('jsonb_path_query() requires at least 2 arguments ' );
@@ -62,7 +64,8 @@ public function test_too_few_arguments_throws_exception(): void
6264 $ this ->buildEntityManager ()->createQuery ($ dql )->getSQL ();
6365 }
6466
65- public function test_too_many_arguments_throws_exception (): void
67+ #[Test]
68+ public function too_many_arguments_throws_exception (): void
6669 {
6770 $ this ->expectException (InvalidArgumentForVariadicFunctionException::class);
6871 $ this ->expectExceptionMessage ('jsonb_path_query() requires between 2 and 4 arguments ' );
You can’t perform that action at this time.
0 commit comments