Skip to content

Commit

Permalink
minor #14088 remove useless tests that fail in php 7 (Tobion)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed Mar 29, 2015
2 parents 0b1f172 + 59cab27 commit 480c0e5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 27 deletions.
Expand Up @@ -66,16 +66,6 @@ protected function tearDown()
$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
*/
Expand Down
Expand Up @@ -52,23 +52,6 @@ public function testConstructorKeyCannotBeEmptyString()
);
}

/**
* @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');
Expand Down

0 comments on commit 480c0e5

Please sign in to comment.