Jelajahi Sumber

[Tests] Fixed Typo

Pascal Borreli 14 tahun lalu
induk
melakukan
3a47fa6eed

+ 3 - 3
tests/Symfony/Tests/Component/Console/Command/CommandTest.php

@@ -210,10 +210,10 @@ class CommandTest extends \PHPUnit_Framework_TestCase
         $command = new Command('foo');
         try {
             $command->run(new StringInput(''), new NullOutput());
-            $this->fail('->run() throws a \LogicException if the execute() method has not been overriden and no code has been provided');
+            $this->fail('->run() throws a \LogicException if the execute() method has not been overridden and no code has been provided');
         } catch (\Exception $e) {
-            $this->assertInstanceOf('\LogicException', $e, '->run() throws a \LogicException if the execute() method has not been overriden and no code has been provided');
-            $this->assertEquals('You must override the execute() method in the concrete command class.', $e->getMessage(), '->run() throws a \LogicException if the execute() method has not been overriden and no code has been provided');
+            $this->assertInstanceOf('\LogicException', $e, '->run() throws a \LogicException if the execute() method has not been overridden and no code has been provided');
+            $this->assertEquals('You must override the execute() method in the concrete command class.', $e->getMessage(), '->run() throws a \LogicException if the execute() method has not been overridden and no code has been provided');
         }
     }
 

+ 1 - 1
tests/Symfony/Tests/Component/DependencyInjection/ContainerBuilderTest.php

@@ -45,7 +45,7 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
 
         $builder->setDefinition('foobar', $foo = new Definition('FooBarClass'));
         $this->assertEquals($foo, $builder->getDefinition('foobar'), '->getDefinition() returns a service definition if defined');
-        $this->assertTrue($builder->setDefinition('foobar', $foo = new Definition('FooBarClass')) === $foo, '->setDefinition() implements a fuild interface by returning the service reference');
+        $this->assertTrue($builder->setDefinition('foobar', $foo = new Definition('FooBarClass')) === $foo, '->setDefinition() implements a fluid interface by returning the service reference');
 
         $builder->addDefinitions($defs = array('foobar' => new Definition('FooBarClass')));
         $this->assertEquals(array_merge($definitions, $defs), $builder->getDefinitions(), '->addDefinitions() adds the service definitions');

+ 1 - 1
tests/Symfony/Tests/Component/DependencyInjection/Dumper/PhpDumperTest.php

@@ -66,7 +66,7 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase
             $this->fail('->dump() throws a RuntimeException if the container to be dumped has reference to objects or resources');
         } catch (\Exception $e) {
             $this->assertInstanceOf('\RuntimeException', $e, '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
-            $this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() returns a LogicException if the dump() method has not been overriden by a children class');
+            $this->assertEquals('Unable to dump a service container if a parameter is an object or a resource.', $e->getMessage(), '->dump() returns a LogicException if the dump() method has not been overridden by a children class');
         }
     }
 

+ 6 - 6
tests/Symfony/Tests/Component/DependencyInjection/ParameterBag/ParameterBagTest.php

@@ -98,18 +98,18 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase
         $bag = new ParameterBag(array());
         try {
             $bag->resolveValue('%foobar%', array());
-            $this->fail('->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existant parameter');
+            $this->fail('->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existent parameter');
         } catch (\Exception $e) {
-            $this->assertInstanceOf('\InvalidArgumentException', $e, '->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existant parameter');
-            $this->assertEquals('The parameter "foobar" must be defined.', $e->getMessage(), '->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existant parameter');
+            $this->assertInstanceOf('\InvalidArgumentException', $e, '->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existent parameter');
+            $this->assertEquals('The parameter "foobar" must be defined.', $e->getMessage(), '->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existent parameter');
         }
 
         try {
             $bag->resolveValue('foo %foobar% bar', array());
-            $this->fail('->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existant parameter');
+            $this->fail('->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existent parameter');
         } catch (\Exception $e) {
-            $this->assertInstanceOf('\InvalidArgumentException', $e, '->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existant parameter');
-            $this->assertEquals('The parameter "foobar" must be defined.', $e->getMessage(), '->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existant parameter');
+            $this->assertInstanceOf('\InvalidArgumentException', $e, '->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existent parameter');
+            $this->assertEquals('The parameter "foobar" must be defined.', $e->getMessage(), '->resolveValue() throws an InvalidArgumentException if a placeholder references a non-existent parameter');
         }
     }
 }

+ 1 - 1
tests/Symfony/Tests/Component/DomCrawler/Field/ChoiceFormFieldTest.php

@@ -226,7 +226,7 @@ class ChoiceFormFieldTest extends FormFieldTestCase
         $node = $this->createNode('input', '', array('type' => 'checkbox', 'name' => 'name'));
         $field = new ChoiceFormField($node);
         $field->tick();
-        $this->assertEquals(1, $field->getValue(), '->tick() ticks checkoxes');
+        $this->assertEquals(1, $field->getValue(), '->tick() ticks checkboxes');
     }
 
     public function testUntick()

+ 1 - 1
tests/Symfony/Tests/Component/DomCrawler/Field/TextareaFormFieldTest.php

@@ -22,7 +22,7 @@ class TextareaFormFieldTest extends FormFieldTestCase
         $node = $this->createNode('textarea', 'foo bar');
         $field = new TextareaFormField($node);
 
-        $this->assertEquals('foo bar', $field->getValue(), '->initialize() sets the value of the field to the textare node value');
+        $this->assertEquals('foo bar', $field->getValue(), '->initialize() sets the value of the field to the textarea node value');
 
         $node = $this->createNode('input', '');
         try {

+ 1 - 1
tests/Symfony/Tests/Component/HttpFoundation/ParameterBagTest.php

@@ -53,7 +53,7 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase
 
         $this->assertEquals('bar', $bag->get('foo'), '->get() gets the value of a parameter');
         $this->assertEquals('default', $bag->get('unknown', 'default'), '->get() returns second argument as default if a parameter is not defined');
-        $this->assertNull($bag->get('null', 'default'), '->get() retuns null if null is set');
+        $this->assertNull($bag->get('null', 'default'), '->get() returns null if null is set');
     }
 
     /**

+ 1 - 1
tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php

@@ -140,7 +140,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase
     public function getFormatToMimeTypeMapProvider()
     {
         return array(
-            array(null, array(null, 'unexistant-mime-type')),
+            array(null, array(null, 'unexistent-mime-type')),
             array('txt', array('text/plain')),
             array('js', array('application/javascript', 'application/x-javascript', 'text/javascript')),
             array('css', array('text/css')),

+ 1 - 1
tests/Symfony/Tests/Component/HttpKernel/KernelTest.php

@@ -357,7 +357,7 @@ EOF;
         $kernel->initializeBundles();
     }
 
-    public function testInitializeBundlesSupportsArbitaryBundleRegistrationOrder()
+    public function testInitializeBundlesSupportsArbitraryBundleRegistrationOrder()
     {
         $grandparent = $this->getBundle(null, null, 'GrandParentCCundle');
         $parent = $this->getBundle(null, 'GrandParentCCundle', 'ParentCCundle');

+ 1 - 1
tests/Symfony/Tests/Component/Routing/CompiledRouteTest.php

@@ -25,7 +25,7 @@ class CompiledRouteTest extends \PHPUnit_Framework_TestCase
         $this->assertEquals('prefix', $compiled->getStaticPrefix(), '__construct() takes a static prefix as its second argument');
         $this->assertEquals('regex', $compiled->getRegex(), '__construct() takes a regexp as its third argument');
         $this->assertEquals(array('tokens'), $compiled->getTokens(), '__construct() takes an array of tokens as its fourth argument');
-        $this->assertEquals(array('variables'), $compiled->getVariables(), '__construct() takes an array of variables as its fith argument');
+        $this->assertEquals(array('variables'), $compiled->getVariables(), '__construct() takes an array of variables as its fifth argument');
     }
 
     public function testgetPatterngetDefaultsgetOptionsgetRequirements()

+ 1 - 1
tests/Symfony/Tests/Component/Routing/Matcher/UrlMatcherTest.php

@@ -43,7 +43,7 @@ class UrlMatcherTest extends \PHPUnit_Framework_TestCase
       $matcher = new UrlMatcher($collection, array(), array());
       $this->assertEquals(array('_route' => 'foo', 'bar' => 'baz', 'def' => 'test'), $matcher->match('/foo/baz'));
 
-      // test that route "metod" is ignore if no method is given in the context
+      // test that route "method" is ignore if no method is given in the context
       $collection = new RouteCollection();
       $collection->add('foo', new Route('/foo', array(), array('_method' => 'GET|head')));
 

+ 1 - 1
tests/Symfony/Tests/Component/Validator/Mapping/ClassMetadataTest.php

@@ -117,7 +117,7 @@ class ClassMetadataTest extends \PHPUnit_Framework_TestCase
         $this->assertFalse($this->metadata->hasMemberMetadatas('non_existant_field'));
     }
 
-    public function testMergeConstraintsKeepsPrivateMembersSeperate()
+    public function testMergeConstraintsKeepsPrivateMembersSeparate()
     {
         $parent = new ClassMetadata(self::PARENTCLASS);
         $parent->addPropertyConstraint('internal', new ConstraintA());