21 $this->
assertSame(
null, $userinfo->getName() );
22 $this->
assertSame(
'', $userinfo->getToken() );
24 $this->
assertSame( $userinfo, $userinfo->verified() );
25 $this->
assertSame(
'<anon>', (
string)$userinfo );
32 $this->fail(
'Expected exception not thrown' );
33 }
catch ( \InvalidArgumentException $ex ) {
34 $this->
assertSame(
'Invalid ID', $ex->getMessage() );
41 $this->
assertSame( $user->getId(), $userinfo->getId() );
42 $this->
assertSame( $user->getName(), $userinfo->getName() );
43 $this->
assertSame( $user->getToken(
true ), $userinfo->getToken() );
45 $userinfo2 = $userinfo->verified();
47 $this->
assertSame(
"<-:{$user->getId()}:{$user->getName()}>", (
string)$userinfo );
51 $this->
assertSame( $user->getId(), $userinfo2->getId() );
52 $this->
assertSame( $user->getName(), $userinfo2->getName() );
53 $this->
assertSame( $user->getToken(
true ), $userinfo2->getToken() );
55 $this->
assertSame( $userinfo2, $userinfo2->verified() );
56 $this->
assertSame(
"<+:{$user->getId()}:{$user->getName()}>", (
string)$userinfo2 );
60 $this->
assertSame( $userinfo, $userinfo->verified() );
66 $this->fail(
'Expected exception not thrown' );
67 }
catch ( \InvalidArgumentException $ex ) {
68 $this->
assertSame(
'Invalid user name', $ex->getMessage() );
76 $this->
assertSame( $user->getId(), $userinfo->getId() );
77 $this->
assertSame( $user->getName(), $userinfo->getName() );
78 $this->
assertSame( $user->getToken(
true ), $userinfo->getToken() );
80 $userinfo2 = $userinfo->verified();
82 $this->
assertSame(
"<-:{$user->getId()}:{$user->getName()}>", (
string)$userinfo );
86 $this->
assertSame( $user->getId(), $userinfo2->getId() );
87 $this->
assertSame( $user->getName(), $userinfo2->getName() );
88 $this->
assertSame( $user->getToken(
true ), $userinfo2->getToken() );
90 $this->
assertSame( $userinfo2, $userinfo2->verified() );
91 $this->
assertSame(
"<+:{$user->getId()}:{$user->getName()}>", (
string)$userinfo2 );
95 $this->
assertSame( $userinfo, $userinfo->verified() );
99 $this->
assertSame( 0, $user->getId(),
'sanity check' );
103 $this->
assertSame( $user->getId(), $userinfo->getId() );
104 $this->
assertSame( $user->getName(), $userinfo->getName() );
105 $this->
assertSame(
'', $userinfo->getToken() );
107 $userinfo2 = $userinfo->verified();
109 $this->
assertSame(
"<-:{$user->getId()}:{$user->getName()}>", (
string)$userinfo );
112 $this->
assertTrue( $userinfo2->isVerified() );
113 $this->
assertSame( $user->getId(), $userinfo2->getId() );
114 $this->
assertSame( $user->getName(), $userinfo2->getName() );
115 $this->
assertSame(
'', $userinfo2->getToken() );
117 $this->
assertSame( $userinfo2, $userinfo2->verified() );
118 $this->
assertSame(
"<+:{$user->getId()}:{$user->getName()}>", (
string)$userinfo2 );
122 $this->
assertSame( $userinfo, $userinfo->verified() );
131 $this->
assertSame( $user->getId(), $userinfo->getId() );
132 $this->
assertSame( $user->getName(), $userinfo->getName() );
133 $this->
assertSame( $user->getToken(
true ), $userinfo->getToken() );
134 $this->
assertSame( $user, $userinfo->getUser() );
135 $userinfo2 = $userinfo->verified();
137 $this->
assertSame(
"<-:{$user->getId()}:{$user->getName()}>", (
string)$userinfo );
140 $this->
assertTrue( $userinfo2->isVerified() );
141 $this->
assertSame( $user->getId(), $userinfo2->getId() );
142 $this->
assertSame( $user->getName(), $userinfo2->getName() );
143 $this->
assertSame( $user->getToken(
true ), $userinfo2->getToken() );
144 $this->
assertSame( $user, $userinfo2->getUser() );
145 $this->
assertSame( $userinfo2, $userinfo2->verified() );
146 $this->
assertSame(
"<+:{$user->getId()}:{$user->getName()}>", (
string)$userinfo2 );
150 $this->
assertSame( $userinfo, $userinfo->verified() );
154 $this->
assertSame( 0, $user->getId(),
'sanity check' );
158 $this->
assertSame( $user->getId(), $userinfo->getId() );
159 $this->
assertSame( $user->getName(), $userinfo->getName() );
160 $this->
assertSame(
'', $userinfo->getToken() );
161 $this->
assertSame( $user, $userinfo->getUser() );
162 $userinfo2 = $userinfo->verified();
164 $this->
assertSame(
"<-:{$user->getId()}:{$user->getName()}>", (
string)$userinfo );
167 $this->
assertTrue( $userinfo2->isVerified() );
168 $this->
assertSame( $user->getId(), $userinfo2->getId() );
169 $this->
assertSame( $user->getName(), $userinfo2->getName() );
170 $this->
assertSame(
'', $userinfo2->getToken() );
171 $this->
assertSame( $user, $userinfo2->getUser() );
172 $this->
assertSame( $userinfo2, $userinfo2->verified() );
173 $this->
assertSame(
"<+:{$user->getId()}:{$user->getName()}>", (
string)$userinfo2 );
177 $this->
assertSame( $userinfo, $userinfo->verified() );
183 $this->
assertSame(
null, $userinfo->getName() );