mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 18:03:17 +00:00

fix: prod / cr-lf in metadata is ok for aggregate filter cr,lf,crlf are normalized - getting field values from recordadapter - during es indexation (direct sql read in metadata...) - before querying
34 lines
828 B
PHP
34 lines
828 B
PHP
<?php
|
|
|
|
namespace Alchemy\Tests\Phrasea\Utilities\String;
|
|
|
|
use Alchemy\Phrasea\Utilities\StringHelper;
|
|
|
|
/**
|
|
* @group functional
|
|
* @group legacy
|
|
*/
|
|
class CamelizerTest extends \PhraseanetTestCase
|
|
{
|
|
/**
|
|
* @dataProvider provideStrings
|
|
* @covers Alchemy\Phrasea\Utilities\StringHelper::camelize
|
|
*/
|
|
public function testCamelize($string, $separator, $expected, $pascalize)
|
|
{
|
|
$result = StringHelper::camelize($string, $separator, $pascalize);
|
|
|
|
$this->assertEquals($expected, $result);
|
|
}
|
|
|
|
public function provideStrings()
|
|
{
|
|
return [
|
|
['string-test', '-', 'stringTest', false],
|
|
['string test', ' ', 'stringTest', false],
|
|
['string_test', '_', 'stringTest', false],
|
|
['string#test', '#', 'StringTest', true],
|
|
];
|
|
}
|
|
}
|