Skip to content

Commit

Permalink
minor #9603 Fixed some typos (fabpot)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.2 branch.

Discussion
----------

Fixed some typos

Commits
-------

5c6edb3 fixed some typos
8d69bb5 fixed @ExpectedException class names
  • Loading branch information
fabpot committed Nov 25, 2013
2 parents 3c5a863 + 5c6edb3 commit 763c8aa
Show file tree
Hide file tree
Showing 44 changed files with 77 additions and 77 deletions.
Expand Up @@ -371,7 +371,7 @@ public function testAssociatedCompositeEntity()
public function testDedicatedEntityManagerNullObject()
{
$uniqueFields = array('name');
$entityManagerName = 'foo';
$entityManagerName = 'foo';

$registry = $this->getMock('Doctrine\Common\Persistence\ManagerRegistry');

Expand Down
Expand Up @@ -54,7 +54,7 @@ public function testExists()
}

/**
* @expectedException Twig_Error_Loader
* @expectedException \Twig_Error_Loader
*/
public function testTwigErrorIfLocatorThrowsInvalid()
{
Expand All @@ -78,7 +78,7 @@ public function testTwigErrorIfLocatorThrowsInvalid()
}

/**
* @expectedException Twig_Error_Loader
* @expectedException \Twig_Error_Loader
*/
public function testTwigErrorIfLocatorReturnsFalse()
{
Expand Down
Expand Up @@ -189,7 +189,7 @@ public function getFixNamespaceDeclarationsDataWithoutTokenizer()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testUnableToLoadClassException()
{
Expand Down
Expand Up @@ -25,7 +25,7 @@ public function testNormalizeThrowsExceptionWhenFalseIsNotAllowed()
}

/**
* @expectedException Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
* @expectedExceptionMessage Unrecognized options "foo" under "root"
*/
public function testExceptionThrownOnUnrecognizedChild()
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Config/Tests/Loader/LoaderTest.php
Expand Up @@ -43,7 +43,7 @@ public function testResolve()
}

/**
* @expectedException Symfony\Component\Config\Exception\FileLoaderLoadException
* @expectedException \Symfony\Component\Config\Exception\FileLoaderLoadException
*/
public function testResolveWhenResolverCannotFindLoader()
{
Expand Down
Expand Up @@ -288,7 +288,7 @@ public function testSetCodeWithNonClosureCallable()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Invalid callable provided to Command::setCode.
*/
public function testSetCodeWithNonCallable()
Expand Down
Expand Up @@ -59,7 +59,7 @@ public function testPopNotLast()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testInvalidPop()
{
Expand Down
Expand Up @@ -410,7 +410,7 @@ public function testMerge()

/**
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::merge
* @expectedException LogicException
* @expectedException \LogicException
*/
public function testMergeLogicException()
{
Expand Down Expand Up @@ -537,7 +537,7 @@ public function testPrivateServiceUser()
}

/**
* @expectedException BadMethodCallException
* @expectedException \BadMethodCallException
*/
public function testThrowsExceptionWhenSetServiceOnAFrozenContainer()
{
Expand All @@ -549,7 +549,7 @@ public function testThrowsExceptionWhenSetServiceOnAFrozenContainer()
}

/**
* @expectedException BadMethodCallException
* @expectedException \BadMethodCallException
*/
public function testThrowsExceptionWhenAddServiceOnAFrozenContainer()
{
Expand Down Expand Up @@ -578,7 +578,7 @@ public function testNoExceptionWhenSetSyntheticServiceOnAFrozenContainer()
}

/**
* @expectedException BadMethodCallException
* @expectedException \BadMethodCallException
*/
public function testThrowsExceptionWhenSetDefinitionOnAFrozenContainer()
{
Expand Down
Expand Up @@ -71,7 +71,7 @@ public function testSetArgument()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testReplaceArgumentShouldRequireIntegerIndex()
{
Expand All @@ -96,7 +96,7 @@ public function testReplaceArgument()
}

/**
* @expectedException OutOfBoundsException
* @expectedException \OutOfBoundsException
*/
public function testGetArgumentShouldCheckBounds()
{
Expand Down
Expand Up @@ -251,7 +251,7 @@ public function testSetArgument()
}

/**
* @expectedException OutOfBoundsException
* @expectedException \OutOfBoundsException
*/
public function testGetArgumentShouldCheckBounds()
{
Expand All @@ -262,7 +262,7 @@ public function testGetArgumentShouldCheckBounds()
}

/**
* @expectedException OutOfBoundsException
* @expectedException \OutOfBoundsException
*/
public function testReplaceArgumentShouldCheckBounds()
{
Expand Down
Expand Up @@ -81,7 +81,7 @@ public function testDumpOptimizationString()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testExportParameters()
{
Expand Down Expand Up @@ -121,7 +121,7 @@ public function testAddService()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @expectedExceptionMessage Service id "bar$" cannot be converted to a valid PHP method name.
*/
public function testAddServiceInvalidServiceId()
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Finder/Expression/Expression.php
Expand Up @@ -130,7 +130,7 @@ public function isGlob()
public function getGlob()
{
if (self::TYPE_GLOB !== $this->value->getType()) {
throw new \LogicException('Regex cant be transformed to glob.');
throw new \LogicException('Regex can\'t be transformed to glob.');
}

return $this->value;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Form/Tests/FormFactoryTest.php
Expand Up @@ -278,7 +278,7 @@ public function testCreateNamedBuilderDoesNotOverrideExistingDataOption()
}

/**
* @expectedException Symfony\Component\Form\Exception\UnexpectedTypeException
* @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException
* @expectedExceptionMessage Expected argument of type "string, Symfony\Component\Form\ResolvedFormTypeInterface or Symfony\Component\Form\FormTypeInterface", "stdClass" given
*/
public function testCreateNamedBuilderThrowsUnderstandableException()
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/HttpFoundation/Tests/CookieTest.php
Expand Up @@ -38,7 +38,7 @@ public function invalidNames()

/**
* @dataProvider invalidNames
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
* @covers Symfony\Component\HttpFoundation\Cookie::__construct
*/
public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidCharacters($name)
Expand All @@ -47,7 +47,7 @@ public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidChara
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testInvalidExpiration()
{
Expand Down
18 changes: 9 additions & 9 deletions src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
Expand Up @@ -678,18 +678,18 @@ public function testGetHost()
$request->initialize(array('foo' => 'bar'));
$this->assertEquals('', $request->getHost(), '->getHost() return empty string if not initialized');

$request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.exemple.com'));
$this->assertEquals('www.exemple.com', $request->getHost(), '->getHost() from Host Header');
$request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com'));
$this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header');

// Host header with port number
$request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.exemple.com:8080'));
$this->assertEquals('www.exemple.com', $request->getHost(), '->getHost() from Host Header with port number');
$request->initialize(array(), array(), array(), array(), array(), array('HTTP_HOST' => 'www.example.com:8080'));
$this->assertEquals('www.example.com', $request->getHost(), '->getHost() from Host Header with port number');

// Server values
$request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.exemple.com'));
$this->assertEquals('www.exemple.com', $request->getHost(), '->getHost() from server name');
$request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com'));
$this->assertEquals('www.example.com', $request->getHost(), '->getHost() from server name');

$request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.exemple.com', 'HTTP_HOST' => 'www.host.com'));
$request->initialize(array(), array(), array(), array(), array(), array('SERVER_NAME' => 'www.example.com', 'HTTP_HOST' => 'www.host.com'));
$this->assertEquals('www.host.com', $request->getHost(), '->getHost() value from Host header has priority over SERVER_NAME ');
$this->stopTrustingProxyData();
}
Expand Down Expand Up @@ -749,7 +749,7 @@ public function testGetPort()
}

/**
* @expectedException RuntimeException
* @expectedException \RuntimeException
*/
public function testGetHostWithFakeHttpHostValue()
{
Expand Down Expand Up @@ -879,7 +879,7 @@ public function testGetContentReturnsResource()
}

/**
* @expectedException LogicException
* @expectedException \LogicException
* @dataProvider getContentCantBeCalledTwiceWithResourcesProvider
*/
public function testGetContentCantBeCalledTwiceWithResources($first, $second)
Expand Down
Expand Up @@ -634,7 +634,7 @@ public function testSetContent($content)
}

/**
* @expectedException UnexpectedValueException
* @expectedException \UnexpectedValueException
* @dataProvider invalidContentProvider
*/
public function testSetContentInvalid($content)
Expand Down
Expand Up @@ -49,15 +49,15 @@ protected function setUp()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testConstructorShouldThrowExceptionForInvalidMongo()
{
new MongoDbSessionHandler(new \stdClass(), $this->options);
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testConstructorShouldThrowExceptionForMissingOptions()
{
Expand Down
Expand Up @@ -97,7 +97,7 @@ public function testGetId()
}

/**
* @expectedException RuntimeException
* @expectedException \RuntimeException
*/
public function testUnstartedSave()
{
Expand Down
Expand Up @@ -107,7 +107,7 @@ public function testMultipleInstances()
}

/**
* @expectedException RuntimeException
* @expectedException \RuntimeException
*/
public function testSaveWithoutStart()
{
Expand Down
Expand Up @@ -34,7 +34,7 @@ public function testRenderWhenRendererDoesNotExist()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testRenderWithUnknownRenderer()
{
Expand All @@ -44,7 +44,7 @@ public function testRenderWithUnknownRenderer()
}

/**
* @expectedException RuntimeException
* @expectedException \RuntimeException
* @expectedExceptionMessage Error when rendering "http://localhost/" (Status code is 404).
*/
public function testDeliverWithUnsuccessfulResponse()
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/HttpKernel/Tests/HttpCache/EsiTest.php
Expand Up @@ -133,7 +133,7 @@ public function testProcessEscapesPhpTags()
}

/**
* @expectedException RuntimeException
* @expectedException \RuntimeException
*/
public function testProcessWhenNoSrcInAnEsi()
{
Expand Down Expand Up @@ -173,7 +173,7 @@ public function testHandle()
}

/**
* @expectedException RuntimeException
* @expectedException \RuntimeException
*/
public function testHandleWhenResponseIsNot200()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/HttpKernel/Tests/HttpKernelTest.php
Expand Up @@ -35,7 +35,7 @@ protected function setUp()
}

/**
* @expectedException RuntimeException
* @expectedException \RuntimeException
*/
public function testHandleWhenControllerThrowsAnExceptionAndRawIsTrue()
{
Expand All @@ -45,7 +45,7 @@ public function testHandleWhenControllerThrowsAnExceptionAndRawIsTrue()
}

/**
* @expectedException RuntimeException
* @expectedException \RuntimeException
*/
public function testHandleWhenControllerThrowsAnExceptionAndRawIsFalseAndNoListenerIsRegistered()
{
Expand Down Expand Up @@ -147,7 +147,7 @@ public function testHandleWhenNoControllerIsFound()
}

/**
* @expectedException LogicException
* @expectedException \LogicException
*/
public function testHandleWhenTheControllerIsNotACallable()
{
Expand Down Expand Up @@ -199,7 +199,7 @@ public function testHandleWhenTheControllerIsAStaticArray()
}

/**
* @expectedException LogicException
* @expectedException \LogicException
*/
public function testHandleWhenTheControllerDoesNotReturnAResponse()
{
Expand Down
8 changes: 4 additions & 4 deletions src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
Expand Up @@ -17,7 +17,7 @@
class StubLocaleTest extends LocaleTestCase
{
/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testGetDisplayCountriesWithUnsupportedLocale()
{
Expand All @@ -37,7 +37,7 @@ public function testGetCountries()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testGetDisplayLanguagesWithUnsupportedLocale()
{
Expand All @@ -57,7 +57,7 @@ public function testGetLanguages()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testGetCurrenciesDataWithUnsupportedLocale()
{
Expand Down Expand Up @@ -92,7 +92,7 @@ public function testGetCurrencies()
}

/**
* @expectedException InvalidArgumentException
* @expectedException \InvalidArgumentException
*/
public function testGetDisplayLocalesWithUnsupportedLocale()
{
Expand Down

0 comments on commit 763c8aa

Please sign in to comment.