예제 #1
0
 public function testSupportsSubClass()
 {
     $this->userManager->setUserClass('\\SimpleUser\\Tests\\CustomUser');
     $user = $this->userManager->createUser('*****@*****.**', 'password');
     $supportsObject = $this->userManager->supportsClass(get_class($user));
     $this->assertTrue($supportsObject);
     $this->userManager->insert($user);
     $freshUser = $this->userManager->refreshUser($user);
     $supportsRefreshedObject = $this->userManager->supportsClass(get_class($freshUser));
     $this->assertTrue($supportsRefreshedObject);
     $this->assertTrue($freshUser instanceof CustomUser);
 }