Skip to content

Commit f80f1d1

Browse files
committed
Refrain from using deprecated annotation key/value pairs
1 parent 2ee67d4 commit f80f1d1

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ JSON patch change log
33

44
## ?.?.? / ????-??-??
55

6+
## 1.1.2 / 2020-04-05
7+
8+
* Implemented RFC #335: Remove deprecated key/value pair annotation syntax
9+
(@thekid)
10+
611
## 1.1.1 / 2020-04-05
712

813
* Made compatible with XP 10 - @thekid

src/test/php/text/json/patch/unittest/OperationsTest.class.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php namespace text\json\patch\unittest;
22

3-
use text\json\patch\Operations;
3+
use lang\IllegalArgumentException;
44
use text\json\patch\AddOperation;
5+
use text\json\patch\CopyOperation;
6+
use text\json\patch\MoveOperation;
7+
use text\json\patch\Operations;
58
use text\json\patch\RemoveOperation;
69
use text\json\patch\ReplaceOperation;
7-
use text\json\patch\MoveOperation;
8-
use text\json\patch\CopyOperation;
910
use text\json\patch\TestOperation;
10-
use lang\IllegalArgumentException;
1111

1212
class 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

Comments
 (0)