Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6ff5015

Browse files
minor #16743 [Bridge/Doctrine+Ldap] Fix tests (nicolas-grekas)
This PR was merged into the 2.8 branch. Discussion ---------- [Bridge/Doctrine+Ldap] Fix tests | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Using "choice_list" is deprecated and thus can't work with 3.0 deps loaded. Test upgrades backported from #16725 @csarrazi : the Ldap tests now require the ldap extension. Annotations added. Commits ------- 4819a70 [Bridge/Doctrine+Ldap] Fix tests
2 parents afe1668 + 4819a70 commit 6ff5015

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -995,13 +995,13 @@ public function testLoaderCaching()
995995
'property3' => 2,
996996
));
997997

998-
$choiceList1 = $form->get('property1')->getConfig()->getOption('choice_list');
999-
$choiceList2 = $form->get('property2')->getConfig()->getOption('choice_list');
1000-
$choiceList3 = $form->get('property3')->getConfig()->getOption('choice_list');
998+
$choiceLoader1 = $form->get('property1')->getConfig()->getOption('choice_loader');
999+
$choiceLoader2 = $form->get('property2')->getConfig()->getOption('choice_loader');
1000+
$choiceLoader3 = $form->get('property3')->getConfig()->getOption('choice_loader');
10011001

1002-
$this->assertInstanceOf('Symfony\Component\Form\ChoiceList\ChoiceListInterface', $choiceList1);
1003-
$this->assertSame($choiceList1, $choiceList2);
1004-
$this->assertSame($choiceList1, $choiceList3);
1002+
$this->assertInstanceOf('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface', $choiceLoader1);
1003+
$this->assertSame($choiceLoader1, $choiceLoader2);
1004+
$this->assertSame($choiceLoader1, $choiceLoader3);
10051005
}
10061006

10071007
public function testCacheChoiceLists()
@@ -1024,8 +1024,8 @@ public function testCacheChoiceLists()
10241024
'choice_label' => 'name',
10251025
));
10261026

1027-
$this->assertInstanceOf('Symfony\Component\Form\ChoiceList\ChoiceListInterface', $field1->getConfig()->getOption('choice_list'));
1028-
$this->assertSame($field1->getConfig()->getOption('choice_list'), $field2->getConfig()->getOption('choice_list'));
1027+
$this->assertInstanceOf('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface', $field1->getConfig()->getOption('choice_loader'));
1028+
$this->assertSame($field1->getConfig()->getOption('choice_loader'), $field2->getConfig()->getOption('choice_loader'));
10291029
}
10301030

10311031
/**

src/Symfony/Component/Security/Core/Tests/Authentication/Provider/LdapBindAuthenticationProviderTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
use Symfony\Component\Security\Core\User\User;
1717
use Symfony\Component\Ldap\Exception\ConnectionException;
1818

19+
/**
20+
* @requires extension ldap
21+
*/
1922
class LdapBindAuthenticationProviderTest extends \PHPUnit_Framework_TestCase
2023
{
2124
/**

src/Symfony/Component/Security/Core/Tests/User/LdapUserProviderTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
use Symfony\Component\Security\Core\User\LdapUserProvider;
1515
use Symfony\Component\Ldap\Exception\ConnectionException;
1616

17+
/**
18+
* @requires extension ldap
19+
*/
1720
class LdapUserProviderTest extends \PHPUnit_Framework_TestCase
1821
{
1922
/**

0 commit comments

Comments
 (0)