Skip to content

Commit 480c0e5

Browse files
committed
minor symfony#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 | symfony#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
2 parents 0b1f172 + 59cab27 commit 480c0e5

File tree

2 files changed

+0
-27
lines changed

2 files changed

+0
-27
lines changed

src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,6 @@ protected function tearDown()
6666
$this->objectChoices = null;
6767
}
6868

69-
/**
70-
* @expectedException \PHPUnit_Framework_Error
71-
*/
72-
public function testChoicesOptionExpectsArray()
73-
{
74-
$this->factory->create('choice', null, array(
75-
'choices' => new \ArrayObject(),
76-
));
77-
}
78-
7969
/**
8070
* @expectedException \Symfony\Component\OptionsResolver\Exception\InvalidOptionsException
8171
*/

src/Symfony/Component/Security/Tests/Core/Authentication/Token/RememberMeTokenTest.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,6 @@ public function testConstructorKeyCannotBeEmptyString()
5252
);
5353
}
5454

55-
/**
56-
* @expectedException \PHPUnit_Framework_Error
57-
* @dataProvider getUserArguments
58-
*/
59-
public function testConstructorUserCannotBeNull($user)
60-
{
61-
new RememberMeToken($user, 'foo', 'foo');
62-
}
63-
64-
public function getUserArguments()
65-
{
66-
return array(
67-
array(null),
68-
array('foo'),
69-
);
70-
}
71-
7255
protected function getUser($roles = array('ROLE_FOO'))
7356
{
7457
$user = $this->getMock('Symfony\Component\Security\Core\User\UserInterface');

0 commit comments

Comments
 (0)