11<?php namespace text \json \patch \unittest ;
22
3- use text \ json \ patch \ Operations ;
3+ use lang \ IllegalArgumentException ;
44use text \json \patch \AddOperation ;
5+ use text \json \patch \CopyOperation ;
6+ use text \json \patch \MoveOperation ;
7+ use text \json \patch \Operations ;
58use text \json \patch \RemoveOperation ;
69use text \json \patch \ReplaceOperation ;
7- use text \json \patch \MoveOperation ;
8- use text \json \patch \CopyOperation ;
910use text \json \patch \TestOperation ;
10- use lang \IllegalArgumentException ;
1111
1212class OperationsTest extends \unittest \TestCase {
1313
@@ -24,12 +24,12 @@ public function add() {
2424 );
2525 }
2626
27- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "path"/ ' )]
27+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "path"/ ' ] )]
2828 public function missing_path_for_add () {
2929 Operations::named ('add ' )->newInstance ([]);
3030 }
3131
32- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "value"/ ' )]
32+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "value"/ ' ] )]
3333 public function missing_value_for_add () {
3434 Operations::named ('add ' )->newInstance (['path ' => '/path ' ]);
3535 }
@@ -42,7 +42,7 @@ public function remove() {
4242 );
4343 }
4444
45- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "path"/ ' )]
45+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "path"/ ' ] )]
4646 public function missing_path_for_remove () {
4747 Operations::named ('remove ' )->newInstance ([]);
4848 }
@@ -55,12 +55,12 @@ public function replace() {
5555 );
5656 }
5757
58- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "path"/ ' )]
58+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "path"/ ' ] )]
5959 public function missing_path_for_replace () {
6060 Operations::named ('replace ' )->newInstance ([]);
6161 }
6262
63- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "value"/ ' )]
63+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "value"/ ' ] )]
6464 public function missing_value_for_replace () {
6565 Operations::named ('replace ' )->newInstance (['path ' => '/path ' ]);
6666 }
@@ -73,12 +73,12 @@ public function move() {
7373 );
7474 }
7575
76- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "from"/ ' )]
76+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "from"/ ' ] )]
7777 public function missing_path_for_move () {
7878 Operations::named ('move ' )->newInstance ([]);
7979 }
8080
81- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "from"/ ' )]
81+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "from"/ ' ] )]
8282 public function missing_from_for_move () {
8383 Operations::named ('move ' )->newInstance (['path ' => '/path ' ]);
8484 }
@@ -91,12 +91,12 @@ public function copy() {
9191 );
9292 }
9393
94- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "from"/ ' )]
94+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "from"/ ' ] )]
9595 public function missing_path_for_copy () {
9696 Operations::named ('copy ' )->newInstance ([]);
9797 }
9898
99- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "from"/ ' )]
99+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "from"/ ' ] )]
100100 public function missing_from_for_copy () {
101101 Operations::named ('copy ' )->newInstance (['path ' => '/path ' ]);
102102 }
@@ -109,12 +109,12 @@ public function test() {
109109 );
110110 }
111111
112- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "path"/ ' )]
112+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "path"/ ' ] )]
113113 public function missing_path_for_test () {
114114 Operations::named ('test ' )->newInstance ([]);
115115 }
116116
117- #[@test, @expect(class= IllegalArgumentException::class, withMessage= '/Missing member "value"/ ' )]
117+ #[@test, @expect([ ' class ' => IllegalArgumentException::class, ' withMessage ' => '/Missing member "value"/ ' ] )]
118118 public function missing_value_for_test () {
119119 Operations::named ('test ' )->newInstance (['path ' => '/path ' ]);
120120 }
0 commit comments