@@ -46,7 +46,7 @@ public function testAGraphNodeCanInstantiateWithData()
46
46
/**
47
47
* @dataProvider provideDateTimeFieldNames
48
48
*/
49
- public function testIsCastDateTimeFieldsToDateTime ($ fieldName )
49
+ public function testCastDateTimeFieldsToDateTime ($ fieldName )
50
50
{
51
51
$ graphNode = new GraphNode ([$ fieldName => '1989-11-02 ' ]);
52
52
@@ -69,7 +69,7 @@ public static function provideDateTimeFieldNames()
69
69
/**
70
70
* @dataProvider provideValidDateTimeFieldValues
71
71
*/
72
- public function testIsCastDateTimeFieldValueToDateTime ($ value , $ message , $ prettyDate = null )
72
+ public function testCastDateTimeFieldValueToDateTime ($ value , $ message , $ prettyDate = null )
73
73
{
74
74
$ graphNode = new GraphNode (['created_time ' => $ value ]);
75
75
@@ -93,7 +93,7 @@ public static function provideValidDateTimeFieldValues()
93
93
/**
94
94
* @dataProvider provideInvalidDateTimeFieldValues
95
95
*/
96
- public function testIsNotCastDateTimeFieldValueToDateTime ($ value , $ message )
96
+ public function testNotCastDateTimeFieldValueToDateTime ($ value , $ message )
97
97
{
98
98
$ graphNode = new GraphNode (['created_time ' => $ value ]);
99
99
@@ -130,23 +130,23 @@ public function testGettingAGraphNodeAsAStringWillSafelyRepresentDateTimes()
130
130
$ this ->assertEquals ('{"id":"123","created_time":"2014-07-15T03:44:53+0000"} ' , $ graphNodeAsString );
131
131
}
132
132
133
- public function testAnExistingPropertyCanBeAccessed ()
133
+ public function testAnExistingFieldCanBeAccessed ()
134
134
{
135
135
$ graphNode = new GraphNode (['foo ' => 'bar ' ]);
136
136
137
137
$ field = $ graphNode ->getField ('foo ' );
138
138
$ this ->assertEquals ('bar ' , $ field );
139
139
}
140
140
141
- public function testAMissingPropertyWillReturnNull ()
141
+ public function testAMissingFieldWillReturnNull ()
142
142
{
143
143
$ graphNode = new GraphNode (['foo ' => 'bar ' ]);
144
144
$ field = $ graphNode ->getField ('baz ' );
145
145
146
146
$ this ->assertNull ($ field , 'Expected the property to return null. ' );
147
147
}
148
148
149
- public function testAMissingPropertyWillReturnTheDefault ()
149
+ public function testAMissingFieldWillReturnTheDefault ()
150
150
{
151
151
$ graphNode = new GraphNode (['foo ' => 'bar ' ]);
152
152
@@ -168,22 +168,16 @@ public function testFalseDefaultsWillReturnSameType()
168
168
$ this ->assertFalse ($ field );
169
169
}
170
170
171
- public function testTheKeysFromTheCollectionCanBeReturned ()
171
+ public function testTheFieldsFromTheGraphNodeCanBeReturned ()
172
172
{
173
173
$ graphNode = new GraphNode ([
174
- 'key1 ' => 'foo ' ,
175
- 'key2 ' => 'bar ' ,
176
- 'key3 ' => 'baz ' ,
174
+ 'field1 ' => 'foo ' ,
175
+ 'field2 ' => 'bar ' ,
176
+ 'field3 ' => 'baz ' ,
177
177
]);
178
178
179
179
$ fieldNames = $ graphNode ->getFieldNames ();
180
- $ this ->assertEquals (['key1 ' , 'key2 ' , 'key3 ' ], $ fieldNames );
181
- }
182
-
183
- public function testAnArrayCanBeInjectedViaTheConstructor ()
184
- {
185
- $ graphNode = new GraphNode (['foo ' , 'bar ' ]);
186
- $ this ->assertEquals (['foo ' , 'bar ' ], $ graphNode ->asArray ());
180
+ $ this ->assertEquals (['field1 ' , 'field2 ' , 'field3 ' ], $ fieldNames );
187
181
}
188
182
189
183
public function testAGraphNodeCanBeConvertedToAString ()
@@ -195,15 +189,15 @@ public function testAGraphNodeCanBeConvertedToAString()
195
189
$ this ->assertEquals ('["foo","bar",123] ' , $ graphNodeAsString );
196
190
}
197
191
198
- public function testACollectionCanBeAccessedAsAnArray ()
192
+ public function testAGraphNodeCanBeAccessedAsAnArray ()
199
193
{
200
194
$ graphNode = new GraphNode (['foo ' => 'bar ' , 'faz ' => 'baz ' ]);
201
195
202
196
$ this ->assertEquals ('bar ' , $ graphNode ['foo ' ]);
203
197
$ this ->assertEquals ('baz ' , $ graphNode ['faz ' ]);
204
198
}
205
199
206
- public function testACollectionCanBeIteratedOver ()
200
+ public function testAGraphNodeCanBeIteratedOver ()
207
201
{
208
202
$ graphNode = new GraphNode (['foo ' => 'bar ' , 'faz ' => 'baz ' ]);
209
203
0 commit comments