@@ -385,6 +385,41 @@ public function test_initialized() {
385
385
$ this ->assertTrue ($ this ->container ->initialized ('late.service ' ), 'Late service is initialized after it was gotten. ' );
386
386
}
387
387
388
+ /**
389
+ * Camelizes a string.
390
+ *
391
+ * @covers ::camelize
392
+ * @dataProvider underscoreCamelizeDataProvider
393
+ */
394
+ public function test_camelize ($ string_underscore , $ string_camelize ) {
395
+ $ result = $ this ->container ->camelize ($ string_underscore );
396
+ $ this ->assertEquals ($ string_camelize , $ result );
397
+ }
398
+
399
+ /**
400
+ * Un-camelizes a string.
401
+ *
402
+ * @covers ::underscore
403
+ * @dataProvider underscoreCamelizeDataProvider
404
+ */
405
+ public function test_underscore ($ string_underscore , $ string_camelize ) {
406
+ $ result = $ this ->container ->underscore ($ string_camelize );
407
+ $ this ->assertEquals ($ string_underscore , $ result );
408
+ }
409
+
410
+ /**
411
+ * Data Provider for ::underscore and ::camelize.
412
+ */
413
+ public function underscoreCamelizeDataProvider () {
414
+ return array (
415
+ array ('service_container ' , 'ServiceContainer ' ),
416
+ array ('service_container_symfony ' , 'ServiceContainerSymfony ' ),
417
+ array ('123service_container ' , '123serviceContainer ' ),
418
+ array ('123service_container_symfony ' , '123serviceContainerSymfony ' ),
419
+ array ('123service_container ' , '123serviceContainer ' ),
420
+ array ('123service_container_symfony ' , '123serviceContainerSymfony ' ),
421
+ );
422
+ }
388
423
389
424
/**
390
425
* Returns a mock container definition.
0 commit comments