Commit b447ec3b authored by Fabien Potencier's avatar Fabien Potencier

fixed risky tests

parent 43e4cf29
......@@ -58,11 +58,15 @@ class ControllerCollectionTest extends TestCase
} catch (ControllerFrozenException $e) {
}
$this->addToAssertionCount(1);
try {
$barController->bind('bar2');
$this->fail();
} catch (ControllerFrozenException $e) {
}
$this->addToAssertionCount(1);
}
public function testConflictingRouteNames()
......
......@@ -275,6 +275,7 @@ class FormServiceProviderTest extends TestCase
try {
$translator->trans('test');
$this->addToAssertionCount(1);
} catch (NotFoundResourceException $e) {
$this->fail('Form factory should not add a translation resource that does not exist');
}
......
......@@ -36,6 +36,8 @@ class ValidatorServiceProviderTest extends TestCase
$app->register(new ValidatorServiceProvider());
$app->register(new FormServiceProvider());
$this->assertInstanceOf('Symfony\Component\Validator\Validator\ValidatorInterface', $app['validator']);
return $app;
}
......@@ -53,6 +55,8 @@ class ValidatorServiceProviderTest extends TestCase
),
));
$this->assertInstanceOf('Symfony\Component\Validator\Validator\ValidatorInterface', $app['validator']);
return $app;
}
......@@ -130,6 +134,7 @@ class ValidatorServiceProviderTest extends TestCase
try {
$translator->trans('test');
$this->addToAssertionCount(1);
} catch (NotFoundResourceException $e) {
$this->fail('Validator should not add a translation resource that does not exist');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment