fixed CS
This commit is contained in:
parent
4c01d64b6b
commit
17cd08dc6c
@ -25,6 +25,7 @@ class Hour1200Transformer extends HourTransformer
|
||||
{
|
||||
$hourOfDay = $dateTime->format('g');
|
||||
$hourOfDay = ('12' == $hourOfDay) ? '0' : $hourOfDay;
|
||||
|
||||
return $this->padLeft($hourOfDay, $length);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@ class Hour2401Transformer extends HourTransformer
|
||||
{
|
||||
$hourOfDay = $dateTime->format('G');
|
||||
$hourOfDay = ('0' == $hourOfDay) ? '24' : $hourOfDay;
|
||||
|
||||
return $this->padLeft($hourOfDay, $length);
|
||||
}
|
||||
|
||||
|
@ -303,6 +303,7 @@ class StubNumberFormatter
|
||||
// The original NumberFormatter does not support this format type
|
||||
if ($type == self::TYPE_CURRENCY) {
|
||||
trigger_error(__METHOD__ . '(): Unsupported format type ' . $type, \E_USER_WARNING);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -439,6 +440,7 @@ class StubNumberFormatter
|
||||
{
|
||||
if ($type == self::TYPE_DEFAULT || $type == self::TYPE_CURRENCY) {
|
||||
trigger_error(__METHOD__ . '(): Unsupported format type ' . $type, \E_USER_WARNING);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -593,6 +595,7 @@ class StubNumberFormatter
|
||||
private function getCurrencySymbol($currency)
|
||||
{
|
||||
$currencies = StubLocale::getCurrenciesData($this->locale);
|
||||
|
||||
return $currencies[$currency]['symbol'];
|
||||
}
|
||||
|
||||
@ -605,6 +608,7 @@ class StubNumberFormatter
|
||||
private function getCurrencyFractionDigits($currency)
|
||||
{
|
||||
$currencies = StubLocale::getCurrenciesData($this->locale);
|
||||
|
||||
return $currencies[$currency]['fractionDigits'];
|
||||
}
|
||||
|
||||
@ -617,6 +621,7 @@ class StubNumberFormatter
|
||||
private function getCurrencyRoundingIncrement($currency)
|
||||
{
|
||||
$currencies = StubLocale::getCurrenciesData($this->locale);
|
||||
|
||||
return $currencies[$currency]['roundingIncrement'];
|
||||
}
|
||||
|
||||
|
@ -23,4 +23,4 @@ class CompositeIdentEntity
|
||||
$this->id2 = $id2;
|
||||
$this->name = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,4 +19,4 @@ class SingleIdentEntity
|
||||
$this->id = $id;
|
||||
$this->name = $name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,4 +106,4 @@ class EntityChoiceListTest extends DoctrineOrmTestCase
|
||||
'group2' => array(2 => 'Bar')
|
||||
), $choiceList->getChoices());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -103,4 +103,4 @@ abstract class AbstractDriverTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
return $ref->invokeArgs($obj, $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,4 +27,4 @@ class XmlDriverTest extends AbstractDriverTest
|
||||
|
||||
return $driver;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,4 +27,4 @@ class YamlDriverTest extends AbstractDriverTest
|
||||
|
||||
return $driver;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,8 +22,8 @@ if (!class_exists('Twig_Environment')) {
|
||||
{
|
||||
// strip away bundle name
|
||||
$parts = explode(':', $name);
|
||||
|
||||
|
||||
return parent::findTemplate(end($parts));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,4 +32,4 @@ class StubTranslator implements TranslatorInterface
|
||||
public function getLocale()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
{# TODO find a smarter way to render the parent type #}
|
||||
<input type="text" id="{{ id }}" value="{{ value }}" />
|
||||
</div>
|
||||
{% endblock _text_id_widget %}
|
||||
{% endblock _text_id_widget %}
|
||||
|
@ -73,4 +73,4 @@ class ResponseTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals($expected, $response->__toString(), '->__toString() returns the headers and the content as a string');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace Apc\Namespaced;
|
||||
class Baz
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
class ApcPrefixCollision_A_Bar
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
class ApcPrefixCollision_A_Foo
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace Apc\NamespaceCollision\A;
|
||||
class Bar
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace Apc\NamespaceCollision\A;
|
||||
class Foo
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
class ApcPrefixCollision_A_B_Bar
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
class ApcPrefixCollision_A_B_Foo
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace Apc\NamespaceCollision\A\B;
|
||||
class Bar
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace Apc\NamespaceCollision\A\B;
|
||||
class Foo
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace Namespaced;
|
||||
class Baz
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace NamespaceCollision\A;
|
||||
class Bar
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace NamespaceCollision\A;
|
||||
class Foo
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
class PrefixCollision_A_Bar
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
class PrefixCollision_A_Foo
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace NamespaceCollision\A\B;
|
||||
class Bar
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -5,4 +5,4 @@ namespace NamespaceCollision\A\B;
|
||||
class Foo
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
class PrefixCollision_A_B_Bar
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -3,4 +3,4 @@
|
||||
class PrefixCollision_A_B_Foo
|
||||
{
|
||||
public static $loaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -39,4 +39,4 @@ class ArrayNodeDefinitionTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
return $reflection->getValue($object);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -80,4 +80,4 @@ class NodeBuilderTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
class SomeNodeDefinition extends BaseVariableNodeDefinition
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -89,4 +89,4 @@ class TreeBuilderTest extends \PHPUnit_Framework_TestCase
|
||||
->end()
|
||||
->end();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -71,4 +71,4 @@ class FinalizationTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
return $processor->process($tree, $configs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -192,4 +192,4 @@ class MergeTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals(array('append_elements' => array('a', 'b', 'c', 'd')), $tree->merge($a, $b));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -141,4 +141,4 @@ class NormalizerTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
self::assertSame($normalized, $tree->normalize($denormalized));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,4 +57,4 @@ class ScalarNodeTest extends \PHPUnit_Framework_TestCase
|
||||
array(new \stdClass()),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,4 +9,4 @@ class BarNodeDefinition extends NodeDefinition
|
||||
protected function createNode()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,4 +22,4 @@ class NodeBuilder extends BaseNodeBuilder
|
||||
return parent::getNodeClass($type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,4 +6,4 @@ use Symfony\Component\Config\Definition\Builder\VariableNodeDefinition as BaseVa
|
||||
|
||||
class VariableNodeDefinition extends BaseVariableNodeDefinition
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -22,4 +22,4 @@ class Foo3Command extends Command
|
||||
throw new \Exception("Second exception", 0, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,4 +69,4 @@ class CheckCircularReferencesPassTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$compiler->compile($container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,4 +67,4 @@ class CheckDefinitionValidityPassTest extends \PHPUnit_Framework_TestCase
|
||||
$pass = new CheckDefinitionValidityPass();
|
||||
$pass->process($container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,4 +68,4 @@ class CheckExceptionOnInvalidReferenceBehaviorPassTest extends \PHPUnit_Framewor
|
||||
$pass = new CheckExceptionOnInvalidReferenceBehaviorPass();
|
||||
$pass->process($container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,4 +95,4 @@ class CheckReferenceValidityPassTest extends \PHPUnit_Framework_TestCase
|
||||
$pass = new CheckReferenceValidityPass();
|
||||
$pass->process($container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -131,4 +131,4 @@ class InlineServiceDefinitionsPassTest extends \PHPUnit_Framework_TestCase
|
||||
$repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), new InlineServiceDefinitionsPass()));
|
||||
$repeatedPass->process($container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -108,4 +108,4 @@ class IntegrationTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertFalse($container->hasDefinition('b'));
|
||||
$this->assertFalse($container->hasDefinition('c'), 'Service C was not inlined.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,4 +86,4 @@ class RemoveUnusedDefinitionsPassTest extends \PHPUnit_Framework_TestCase
|
||||
$repeatedPass = new RepeatedPass(array(new AnalyzeServiceReferencesPass(), new RemoveUnusedDefinitionsPass()));
|
||||
$repeatedPass->process($container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -53,4 +53,4 @@ class ResolveReferencesToAliasesPassTest extends \PHPUnit_Framework_TestCase
|
||||
$pass = new ResolveReferencesToAliasesPass();
|
||||
$pass->process($container);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -69,4 +69,4 @@ class DefinitionDecoratorTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertSame($def, $def->replaceArgument(0, 'foo'));
|
||||
$this->assertEquals(array('index_0' => 'foo'), $def->getArguments());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,4 +9,4 @@ $container->
|
||||
addArgument(new Definition('BarClass', array(new Definition('BazClass'))))
|
||||
;
|
||||
|
||||
return $container;
|
||||
return $container;
|
||||
|
@ -10,4 +10,4 @@ $container->
|
||||
addTag('foo"bar\\bar', array('foo' => 'foo"barřž€'))
|
||||
;
|
||||
|
||||
return $container;
|
||||
return $container;
|
||||
|
@ -31,4 +31,4 @@ class BarClassFactory
|
||||
{
|
||||
return new BarClass();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -44,4 +44,4 @@ $phar->addFromString('schema/project-1.0.xsd', <<<EOT
|
||||
</xsd:schema>
|
||||
EOT
|
||||
);
|
||||
$phar->setStub('<?php require_once "phar://ProjectWithXsdExtensionInPhar.phar/ProjectWithXsdExtensionInPhar.php"; __HALT_COMPILER(); ?>');
|
||||
$phar->setStub('<?php require_once "phar://ProjectWithXsdExtensionInPhar.phar/ProjectWithXsdExtensionInPhar.php"; __HALT_COMPILER(); ?>');
|
||||
|
@ -8,4 +8,4 @@
|
||||
|
||||
<project:bar />
|
||||
|
||||
</container>
|
||||
</container>
|
||||
|
@ -8,4 +8,4 @@
|
||||
|
||||
<project:bar bar="foo" />
|
||||
|
||||
</container>
|
||||
</container>
|
||||
|
@ -2,4 +2,4 @@ services:
|
||||
foo_service:
|
||||
class: FooClass
|
||||
# tags is not an array
|
||||
tags: string
|
||||
tags: string
|
||||
|
@ -3,4 +3,4 @@ services:
|
||||
class: FooClass
|
||||
tags:
|
||||
# tag is missing the name key
|
||||
foo_tag: { foo: bar }
|
||||
foo_tag: { foo: bar }
|
||||
|
@ -1 +1 @@
|
||||
false
|
||||
false
|
||||
|
@ -8,4 +8,4 @@ parameters:
|
||||
bar: foo
|
||||
foo_bar: @foo_bar
|
||||
MixedCase:
|
||||
MixedCaseKey: value
|
||||
MixedCaseKey: value
|
||||
|
@ -296,7 +296,7 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
|
||||
$loader1 = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml/extension1'));
|
||||
$loader1->load('services.xml');
|
||||
$services = $container->getDefinitions();
|
||||
$this->assertEquals(2, count($services), '->load() attributes unique ids to anonymous services');
|
||||
$this->assertEquals(2, count($services), '->load() attributes unique ids to anonymous services');
|
||||
$loader2 = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml/extension2'));
|
||||
$loader2->load('services.xml');
|
||||
$services = $container->getDefinitions();
|
||||
|
@ -45,4 +45,4 @@ class ConcreteExtension extends AbstractExtension
|
||||
protected function loadTypeGuesser()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,4 +50,4 @@ class MyTestType extends AbstractType {}
|
||||
|
||||
class MyTestForm extends AbstractType {}
|
||||
|
||||
class MyTestFormType extends AbstractType {}
|
||||
class MyTestFormType extends AbstractType {}
|
||||
|
@ -82,4 +82,4 @@ class PropertyPathMapperTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->mapper->mapDataToForm(null, $form);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,4 +19,4 @@ class DateTimeTestCase extends LocalizedTestCase
|
||||
{
|
||||
self::assertEquals($expected->format('c'), $actual->format('c'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,4 @@ class LocalizedTestCase extends \PHPUnit_Framework_TestCase
|
||||
$this->markTestSkipped('The "intl" extension is not available');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -164,4 +164,4 @@ class FixFileUploadListenerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
return $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,4 +51,4 @@ class FixUrlProtocolListenerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals('ftp://www.symfony.com', $event->getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -254,4 +254,4 @@ class ResizeFormListenerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals(array(), $event->getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,4 +39,4 @@ class TrimListenerTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertSame(1234, $event->getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -172,9 +172,9 @@ class ChoiceTypeTest extends TypeTestCase
|
||||
'expanded' => true,
|
||||
'choices' => $this->choices,
|
||||
));
|
||||
|
||||
|
||||
$form->bind(false);
|
||||
|
||||
|
||||
$this->assertEmpty($form->getExtraData());
|
||||
$this->assertNull($form->getData());
|
||||
}
|
||||
|
@ -160,4 +160,4 @@ class DateTimeTypeTest extends LocalizedTestCase
|
||||
|
||||
$this->assertEquals($dateTime->format('Y-m-d H:i:s'), $form->getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -136,6 +136,7 @@ class FormTypeTest extends TypeTestCase
|
||||
$builder->get('referenceCopy')->appendClientTransformer(new CallbackTransformer(
|
||||
function () {},
|
||||
function ($value) { // reverseTransform
|
||||
|
||||
return 'foobar';
|
||||
}
|
||||
));
|
||||
@ -162,6 +163,7 @@ class FormTypeTest extends TypeTestCase
|
||||
$builder->get('referenceCopy')->appendClientTransformer(new CallbackTransformer(
|
||||
function () {},
|
||||
function ($value) use ($ref2) { // reverseTransform
|
||||
|
||||
return $ref2;
|
||||
}
|
||||
));
|
||||
|
@ -26,4 +26,4 @@ class IntegerTypeTest extends LocalizedTestCase
|
||||
$this->assertSame(1, $form->getData());
|
||||
$this->assertSame('1', $form->getClientData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,4 +23,4 @@ abstract class LocalizedTestCase extends TypeTestCase
|
||||
$this->markTestSkipped('The "intl" extension is not available');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,4 +61,4 @@ class RepeatedTypeTest extends TypeTestCase
|
||||
$this->assertEquals($input, $this->form->getClientData());
|
||||
$this->assertEquals('foo', $this->form->getData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -396,4 +396,4 @@ class TimeTypeTest extends LocalizedTestCase
|
||||
|
||||
$this->assertTrue($form->isPartiallyFilled());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -62,4 +62,4 @@ class UrlTypeTest extends LocalizedTestCase
|
||||
$this->assertSame('www.domain.com', $form->getData());
|
||||
$this->assertSame('www.domain.com', $form->getClientData());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -47,4 +47,4 @@ class DefaultCsrfProviderTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertFalse($this->provider->isCsrfTokenValid('foo', $token));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -70,4 +70,4 @@ class SessionCsrfProviderTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertFalse($this->provider->isCsrfTokenValid('foo', $token));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -607,4 +607,4 @@ class DelegatingValidatorTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->validator->validate($form);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,4 +48,4 @@ class Author
|
||||
private function setPrivateSetter($data)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,4 +32,4 @@ class FixedDataTransformer implements DataTransformerInterface
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,4 +46,4 @@ class FooType extends AbstractType
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,4 +23,4 @@ class FooTypeBarExtension extends AbstractTypeExtension
|
||||
{
|
||||
return 'foo';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -16,4 +16,4 @@ class FooTypeBazExtension extends AbstractTypeExtension
|
||||
{
|
||||
return 'foo';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -15,4 +15,4 @@ class Magician
|
||||
{
|
||||
return isset($this->$property) ? $this->$property : null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -60,4 +60,4 @@ class TestExtension implements FormExtensionInterface
|
||||
{
|
||||
return $this->guesser;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -147,4 +147,4 @@ class FormBuilderTest extends \PHPUnit_Framework_TestCase
|
||||
->disableOriginalConstructor()
|
||||
->getMock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,4 +4,4 @@ namespace Symfony\Tests\Component\Form;
|
||||
|
||||
interface FormInterface extends \Iterator, \Symfony\Component\Form\FormInterface
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -1029,4 +1029,4 @@ class FormTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
return $this->getMock('Symfony\Component\Form\FormValidatorInterface');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,4 +33,4 @@ class GuessTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
new TestGuess(5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -399,4 +399,4 @@ class PropertyPathTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
new PropertyPath(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -50,4 +50,4 @@ class FormUtilTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertSame($out, FormUtil::toArrayKeys($in));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -137,15 +137,15 @@ class CookieTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertTrue($cookie->isCleared(), '->isCleared() returns true if the cookie has expired');
|
||||
}
|
||||
|
||||
|
||||
public function testToString()
|
||||
{
|
||||
$cookie = new Cookie('foo', 'bar', strtotime('Fri, 20-May-2011 15:25:52 GMT'), '/', '.myfoodomain.com', true);
|
||||
|
||||
$this->assertEquals('foo=bar; expires=Fri, 20-May-2011 15:25:52 GMT; path=/; domain=.myfoodomain.com; secure; httponly', $cookie->__toString(), '->__toString() returns string representation of the cookie');
|
||||
|
||||
|
||||
$cookie = new Cookie('foo', null, 1, '/', '.myfoodomain.com');
|
||||
|
||||
|
||||
$this->assertEquals('foo=deleted; expires=' . gmdate("D, d-M-Y H:i:s T", time()-31536001) . '; path=/; domain=.myfoodomain.com; httponly', $cookie->__toString(), '->__toString() returns string representation of a cleared cookie if value is NULL');
|
||||
}
|
||||
}
|
||||
|
@ -184,4 +184,4 @@ class FileTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
return $guesser;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
$this->assertEquals('original.gif', $file->getOriginalName());
|
||||
}
|
||||
|
||||
|
||||
public function testGetOriginalNameSanitizeFilename()
|
||||
{
|
||||
$file = new UploadedFile(
|
||||
@ -91,5 +91,5 @@ class UploadedFileTest extends \PHPUnit_Framework_TestCase
|
||||
);
|
||||
|
||||
$this->assertEquals('original.gif', $file->getOriginalName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -162,4 +162,4 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase
|
||||
$this->assertEquals(123, $bag->getInt('digits'), '->getInt() gets a value of parameter as integer');
|
||||
$this->assertEquals(0, $bag->getInt('unknown'), '->getInt() returns zero if a parameter is not defined');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -462,11 +462,11 @@ class RequestTest extends \PHPUnit_Framework_TestCase
|
||||
$request->setMethod('POST');
|
||||
$request->request->set('_method', 'purge');
|
||||
$this->assertEquals('PURGE', $request->getMethod(), '->getMethod() returns the method from _method if defined and POST');
|
||||
|
||||
|
||||
$request->setMethod('POST');
|
||||
$request->server->set('X-HTTP-METHOD-OVERRIDE', 'delete');
|
||||
$this->assertEquals('DELETE', $request->getMethod(), '->getMethod() returns the method from X-HTTP-Method-Override even though _method is set if defined and POST');
|
||||
|
||||
|
||||
$request = new Request();
|
||||
$request->setMethod('POST');
|
||||
$request->server->set('X-HTTP-METHOD-OVERRIDE', 'delete');
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user