Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 4.2: [HttpFoundation] Check file exists before unlink [Console] Fixed #29835: ConfirmationQuestion with default true for answer '0' [Cache] PDO-based cache pool table autocreation does not work [Translation] Concatenated translation messages [Form] ensure compatibility with older PHPUnit mocks [Serializer] Docblock about throwing exceptions on serializer [Cache] fix used variable name [Debug][ErrorHandler] Preserve our error handler when a logger set another one [Form] Changed UrlType input type to text when default_protocol is not null [Bugfix] MemcachedSessionHandler::close() must close connection Always pass $key to NullAdapter->createCacheItem
- Loading branch information
Showing
42 changed files
with
595 additions
and
363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/Symfony/Component/Cache/Tests/Simple/Psr6CacheWithAdapterTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Cache\Tests\Simple; | ||
|
||
use Symfony\Component\Cache\Adapter\FilesystemAdapter; | ||
|
||
/** | ||
* @group time-sensitive | ||
*/ | ||
class Psr6CacheWithAdapterTest extends Psr6CacheTest | ||
{ | ||
protected function createCacheItemPool($defaultLifetime = 0) | ||
{ | ||
return new FilesystemAdapter('', $defaultLifetime); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/Symfony/Component/Cache/Tests/Simple/Psr6CacheWithoutAdapterTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Cache\Tests\Simple; | ||
|
||
use Symfony\Component\Cache\Tests\Fixtures\ExternalAdapter; | ||
|
||
/** | ||
* @group time-sensitive | ||
*/ | ||
class Psr6CacheWithoutAdapterTest extends Psr6CacheTest | ||
{ | ||
protected function createCacheItemPool($defaultLifetime = 0) | ||
{ | ||
return new ExternalAdapter($defaultLifetime); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
src/Symfony/Component/Console/Tests/Question/ConfirmationQuestionTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the Symfony package. | ||
* | ||
* (c) Fabien Potencier <fabien@symfony.com> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Console\Tests\Question; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
use Symfony\Component\Console\Question\ConfirmationQuestion; | ||
|
||
class ConfirmationQuestionTest extends TestCase | ||
{ | ||
/** | ||
* @dataProvider normalizerUsecases | ||
*/ | ||
public function testDefaultRegexUsecases($default, $answers, $expected, $message) | ||
{ | ||
$sut = new ConfirmationQuestion('A question', $default); | ||
|
||
foreach ($answers as $answer) { | ||
$normalizer = $sut->getNormalizer(); | ||
$actual = $normalizer($answer); | ||
$this->assertEquals($expected, $actual, sprintf($message, $answer)); | ||
} | ||
} | ||
|
||
public function normalizerUsecases() | ||
{ | ||
return [ | ||
[ | ||
true, | ||
['y', 'Y', 'yes', 'YES', 'yEs', ''], | ||
true, | ||
'When default is true, the normalizer must return true for "%s"', | ||
], | ||
[ | ||
true, | ||
['n', 'N', 'no', 'NO', 'nO', 'foo', '1', '0'], | ||
false, | ||
'When default is true, the normalizer must return false for "%s"', | ||
], | ||
[ | ||
false, | ||
['y', 'Y', 'yes', 'YES', 'yEs'], | ||
true, | ||
'When default is false, the normalizer must return true for "%s"', | ||
], | ||
[ | ||
false, | ||
['n', 'N', 'no', 'NO', 'nO', 'foo', '1', '0', ''], | ||
false, | ||
'When default is false, the normalizer must return false for "%s"', | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.