mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
PHRAS-504 #time 8h
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
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Utilities\String;
|
||||
|
||||
use Alchemy\Phrasea\Utilities\String\Camelizer;
|
||||
use Alchemy\Phrasea\Utilities\StringHelper;
|
||||
|
||||
/**
|
||||
* @group functional
|
||||
@@ -12,12 +12,11 @@ class CamelizerTest extends \PhraseanetTestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider provideStrings
|
||||
* @covers Alchemy\Phrasea\Utilities\String\Camelizer::camelize
|
||||
* @covers Alchemy\Phrasea\Utilities\StringHelper::camelize
|
||||
*/
|
||||
public function testCamelize($string, $separator, $expected, $pascalize)
|
||||
{
|
||||
$camelizer = new Camelizer();
|
||||
$result = $camelizer->camelize($string, $separator, $pascalize);
|
||||
$result = StringHelper::camelize($string, $separator, $pascalize);
|
||||
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Alchemy\Tests\Phrasea\Utilities\String;
|
||||
|
||||
use Alchemy\Phrasea\Utilities\StringHelper;
|
||||
|
||||
/**
|
||||
* @group functional
|
||||
* @group legacy
|
||||
*/
|
||||
class CrLfNormalizerTest extends \PhraseanetTestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider provideStrings
|
||||
* @covers Alchemy\Phrasea\Utilities\StringHelper::crlfNormalize
|
||||
*/
|
||||
public function testCrLfNormalize($string, $expected)
|
||||
{
|
||||
$result = StringHelper::crlfNormalize($string);
|
||||
|
||||
$this->assertEquals($expected, $result);
|
||||
}
|
||||
|
||||
public function provideStrings()
|
||||
{
|
||||
return [
|
||||
['ABC\rDEF', 'ABC\nDEF'],
|
||||
['ABC\nDEF', 'ABC\nDEF'],
|
||||
['ABC\r\nDEF', 'ABC\nDEF'],
|
||||
['ABC\n\rDEF', 'ABC\n\nDEF'],
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user