for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of php-cache\cache-bundle package.
*
* (c) 2015-2015 Aaron Scherer <[email protected]>, Tobias Nyholm <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Cache\CacheBundle\Tests\Unit;
use Cache\CacheBundle\KeyNormalizer;
class KeyNormalizerTest extends \PHPUnit_Framework_TestCase
{
public function testOnlyValid()
$input = '%foo!bar-';
$expected = 'foobar';
$this->assertEquals($expected, KeyNormalizer::onlyValid($input));
}
public function testNoInvalid()
$input = '{foo@bar}';
$this->assertEquals($expected, KeyNormalizer::noInvalid($input));