1515
1616final class RequestParametersTest extends \Facebook \HackTest \ HackTest {
1717 public function testStringParam (): void {
18- $parts = varray [new StringRequestParameter (
18+ $parts = vec [new StringRequestParameter (
1919 StringRequestParameterSlashes :: WITHOUT_SLASHES ,
2020 ' foo' ,
2121 )];
2222 $data = dict [' foo' => ' bar' ];
23- expect ((new RequestParameters ($parts , varray [], $data ))-> getString(' foo' ))
23+ expect ((new RequestParameters ($parts , vec [], $data ))-> getString(' foo' ))
2424 -> toBeSame(' bar' );
2525 }
2626
2727 public function testIntParam (): void {
28- $parts = varray [new IntRequestParameter (' foo' )];
28+ $parts = vec [new IntRequestParameter (' foo' )];
2929 $data = dict [' foo' => ' 123' ];
30- expect ((new RequestParameters ($parts , varray [], $data ))-> getInt(' foo' ))-> toBeSame(
31- 123 ,
32- );
30+ expect ((new RequestParameters ($parts , vec [], $data ))-> getInt(' foo' ))
31+ -> toBeSame(123 );
3332 }
3433
3534 public function testFetchingStringAsInt (): void {
3635 expect (() ==> {
37- $parts = varray [new StringRequestParameter (
36+ $parts = vec [new StringRequestParameter (
3837 StringRequestParameterSlashes :: WITHOUT_SLASHES ,
3938 ' foo' ,
4039 )];
4140 $data = dict [' foo' => ' bar' ];
42- (new RequestParameters ($parts , varray [], $data ))-> getInt(' foo' );
41+ (new RequestParameters ($parts , vec [], $data ))-> getInt(' foo' );
4342 })-> toThrow(InvariantException :: class );
4443 }
4544
4645 public function testEnumParam (): void {
47- $parts = varray [new EnumRequestParameter (TestIntEnum :: class , ' foo' )];
46+ $parts = vec [new EnumRequestParameter (TestIntEnum :: class , ' foo' )];
4847 $data = dict [' foo' => (string )TestIntEnum :: BAR ];
49- $value = (new RequestParameters ($parts , varray [], $data ))-> getEnum(
48+ $value = (new RequestParameters ($parts , vec [], $data ))-> getEnum(
5049 TestIntEnum :: class ,
5150 ' foo' ,
5251 );
@@ -85,7 +84,7 @@ public function testFromPattern(): void {
8584 ' bar' => ' 123' ,
8685 ' baz' => (string )TestIntEnum :: FOO ,
8786 ];
88- $params = new RequestParameters ($parts , varray [], $data );
87+ $params = new RequestParameters ($parts , vec [], $data );
8988 expect ($params -> getString(' foo' ))-> toBeSame(' some string' );
9089 expect ($params -> getInt(' bar' ))-> toBeSame(123 );
9190 expect ($params -> getEnum(TestIntEnum :: class , ' baz' ))-> toBeSame(
@@ -95,8 +94,8 @@ public function testFromPattern(): void {
9594
9695 public function testGetOptional (): void {
9796 $params = new RequestParameters (
98- varray [],
99- varray [new StringRequestParameter (
97+ vec [],
98+ vec [new StringRequestParameter (
10099 StringRequestParameterSlashes :: WITHOUT_SLASHES ,
101100 ' foo' ,
102101 )],
@@ -107,8 +106,8 @@ public function testGetOptional(): void {
107106
108107 public function testGetMissingOptional (): void {
109108 $params = new RequestParameters (
110- varray [],
111- varray [new StringRequestParameter (
109+ vec [],
110+ vec [new StringRequestParameter (
112111 StringRequestParameterSlashes :: WITHOUT_SLASHES ,
113112 ' foo' ,
114113 )],
@@ -120,8 +119,8 @@ public function testGetMissingOptional(): void {
120119 public function testGetOptionalAsRequired (): void {
121120 expect (() ==> {
122121 $params = new RequestParameters (
123- varray [],
124- varray [new StringRequestParameter (
122+ vec [],
123+ vec [new StringRequestParameter (
125124 StringRequestParameterSlashes :: WITHOUT_SLASHES ,
126125 ' foo' ,
127126 )],
@@ -134,11 +133,11 @@ public function testGetOptionalAsRequired(): void {
134133 public function testGetRequiredAsOptional (): void {
135134 expect (() ==> {
136135 $params = new RequestParameters (
137- varray [new StringRequestParameter (
136+ vec [new StringRequestParameter (
138137 StringRequestParameterSlashes :: WITHOUT_SLASHES ,
139138 ' foo' ,
140139 )],
141- varray [],
140+ vec [],
142141 dict [' foo' => ' bar' ],
143142 );
144143 $params -> getOptionalString(' foo' );
0 commit comments