use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
use Symfony\Component\Security\Core\User\UserInterface;
class EntityUserProviderTest extends TestCase
{ public function testRefreshUserGetsUserByPrimaryKey() { $em = DoctrineTestHelper::
createTestEntityManager();
$this->
createSchema($em);
$user1 =
new User(1, 1, 'user1'
);
$user2 =
new User(1, 2, 'user2'
);
$em->
persist($user1);
$em->
persist($user2);
$em->
flush();
$provider =
new EntityUserProvider($this->
getManager($em), 'Symfony\Bridge\Doctrine\Tests\Fixtures\User', 'name'
);
// try to change the user identity
$user1->name = 'user2';