|
3 | 3 | namespace Tests\DataValues\Deserializers; |
4 | 4 |
|
5 | 5 | use DataValues\BooleanValue; |
| 6 | +use DataValues\DataValue; |
6 | 7 | use DataValues\Deserializers\DataValueDeserializer; |
7 | 8 | use DataValues\NumberValue; |
8 | 9 | use DataValues\StringValue; |
@@ -31,8 +32,8 @@ private function newDeserializer() { |
31 | 32 | 'boolean' => function( $bool ) { |
32 | 33 | return new BooleanValue( $bool ); |
33 | 34 | }, |
34 | | - 'number' => 'DataValues\NumberValue', |
35 | | - 'string' => 'DataValues\StringValue', |
| 35 | + 'number' => NumberValue::class, |
| 36 | + 'string' => StringValue::class, |
36 | 37 | ) ); |
37 | 38 | } |
38 | 39 |
|
@@ -81,13 +82,13 @@ public function notADataValuesListProvider() { |
81 | 82 | ), |
82 | 83 | array( |
83 | 84 | array( |
84 | | - 'string' => 'DataValues\StringValue', |
| 85 | + 'string' => StringValue::class, |
85 | 86 | 'number' => 42, |
86 | 87 | ) |
87 | 88 | ), |
88 | 89 | array( |
89 | 90 | array( |
90 | | - 'string' => 'DataValues\StringValue', |
| 91 | + 'string' => StringValue::class, |
91 | 92 | 'object' => 'stdClass', |
92 | 93 | ) |
93 | 94 | ) |
@@ -185,7 +186,7 @@ public function testGivenDataValueSerialization_deserializeReturnsDataValue( $dv |
185 | 186 |
|
186 | 187 | $dataValue = $deserializer->deserialize( $dvSerialization ); |
187 | 188 |
|
188 | | - $this->assertInstanceOf( 'DataValues\DataValue', $dataValue ); |
| 189 | + $this->assertInstanceOf( DataValue::class, $dataValue ); |
189 | 190 | $this->assertEquals( $expectedType, $dataValue->getType() ); |
190 | 191 | } |
191 | 192 |
|
|
0 commit comments