|
@@ 260-270 (lines=11) @@
|
| 257 |
|
$this->configuration->ensureProductionSettings(); |
| 258 |
|
} |
| 259 |
|
|
| 260 |
|
public function testAddGetCustomStringFunction() |
| 261 |
|
{ |
| 262 |
|
$this->configuration->addCustomStringFunction('FunctionName', __CLASS__); |
| 263 |
|
|
| 264 |
|
self::assertSame(__CLASS__, $this->configuration->getCustomStringFunction('FunctionName')); |
| 265 |
|
self::assertSame(null, $this->configuration->getCustomStringFunction('NonExistingFunction')); |
| 266 |
|
|
| 267 |
|
$this->configuration->setCustomStringFunctions(['OtherFunctionName' => __CLASS__]); |
| 268 |
|
|
| 269 |
|
self::assertSame(__CLASS__, $this->configuration->getCustomStringFunction('OtherFunctionName')); |
| 270 |
|
} |
| 271 |
|
|
| 272 |
|
public function testAddGetCustomNumericFunction() |
| 273 |
|
{ |
|
@@ 272-282 (lines=11) @@
|
| 269 |
|
self::assertSame(__CLASS__, $this->configuration->getCustomStringFunction('OtherFunctionName')); |
| 270 |
|
} |
| 271 |
|
|
| 272 |
|
public function testAddGetCustomNumericFunction() |
| 273 |
|
{ |
| 274 |
|
$this->configuration->addCustomNumericFunction('FunctionName', __CLASS__); |
| 275 |
|
|
| 276 |
|
self::assertSame(__CLASS__, $this->configuration->getCustomNumericFunction('FunctionName')); |
| 277 |
|
self::assertSame(null, $this->configuration->getCustomNumericFunction('NonExistingFunction')); |
| 278 |
|
|
| 279 |
|
$this->configuration->setCustomNumericFunctions(['OtherFunctionName' => __CLASS__]); |
| 280 |
|
|
| 281 |
|
self::assertSame(__CLASS__, $this->configuration->getCustomNumericFunction('OtherFunctionName')); |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
public function testAddGetCustomDatetimeFunction() |
| 285 |
|
{ |
|
@@ 284-294 (lines=11) @@
|
| 281 |
|
self::assertSame(__CLASS__, $this->configuration->getCustomNumericFunction('OtherFunctionName')); |
| 282 |
|
} |
| 283 |
|
|
| 284 |
|
public function testAddGetCustomDatetimeFunction() |
| 285 |
|
{ |
| 286 |
|
$this->configuration->addCustomDatetimeFunction('FunctionName', __CLASS__); |
| 287 |
|
|
| 288 |
|
self::assertSame(__CLASS__, $this->configuration->getCustomDatetimeFunction('FunctionName')); |
| 289 |
|
self::assertSame(null, $this->configuration->getCustomDatetimeFunction('NonExistingFunction')); |
| 290 |
|
|
| 291 |
|
$this->configuration->setCustomDatetimeFunctions(['OtherFunctionName' => __CLASS__]); |
| 292 |
|
|
| 293 |
|
self::assertSame(__CLASS__, $this->configuration->getCustomDatetimeFunction('OtherFunctionName')); |
| 294 |
|
} |
| 295 |
|
|
| 296 |
|
public function testAddGetCustomHydrationMode() |
| 297 |
|
{ |