minor #14088 remove useless tests that fail in php 7 (Tobion)

This PR was merged into the 2.3 branch.

Discussion
----------

remove useless tests that fail in php 7

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14086 for Security and Form component
| License       | MIT
| Doc PR        | -

`@expectedException \PHPUnit_Framework_Error` doesn't catch php fatal errors for wrong types in php 7. But these test are also pretty useless anyway. Then we would have to add a lot of tests for all arguments that are typehinted. Let's just remove these tests.

Commits
-------

59cab27 remove useless tests that fail in php 7
This commit is contained in:
Fabien Potencier 2015-03-29 11:42:57 +02:00
commit 480c0e509e
2 changed files with 0 additions and 27 deletions

View File

@ -66,16 +66,6 @@ class ChoiceTypeTest extends \Symfony\Component\Form\Test\TypeTestCase
$this->objectChoices = null;
}
/**
* @expectedException \PHPUnit_Framework_Error
*/
public function testChoicesOptionExpectsArray()
{
$this->factory->create('choice', null, array(
'choices' => new \ArrayObject(),
));
}
/**
* @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
*/

View File

@ -52,23 +52,6 @@ class RememberMeTokenTest extends \PHPUnit_Framework_TestCase
);
}
/**
* @expectedException \PHPUnit_Framework_Error
* @dataProvider getUserArguments
*/
public function testConstructorUserCannotBeNull($user)
{
new RememberMeToken($user, 'foo', 'foo');
}
public function getUserArguments()
{
return array(
array(null),
array('foo'),
);
}
protected function getUser($roles = array('ROLE_FOO'))
{
$user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface');