Changeset 15303
- Timestamp:
- 07/06/08 23:20:45 (5 years ago)
- Location:
- events/phpframework/piece_framework/trunk/specs/Phwittr
- Files:
-
- 2 modified
-
Self/FriendRequestToPrivateUserSpec.php (modified) (1 diff)
-
User/ProtectedUserSpec.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
events/phpframework/piece_framework/trunk/specs/Phwittr/Self/FriendRequestToPrivateUserSpec.php
r15235 r15303 230 230 } 231 231 232 public function itプライベートユーザがフォローしているユーザからは、フォローリクエストになる() 233 { 234 $this->_fooSelf->removeFriend($this->_bar->id); 235 $this->_barSelf->follow($this->_foo->id); 236 $this->_fooSelf->follow($this->_bar->id); 237 238 $mapper = Piece_ORM::getMapper('Followers'); 239 $followers = $mapper->findAllByUserId($this->_foo->id); 240 241 $this->spec(count($followers))->should->be(1); 242 $this->spec($followers[0]->userId)->should->be($this->_foo->id); 243 $this->spec($followers[0]->followId)->should->be($this->_bar->id); 244 245 $mapper = Piece_ORM::getMapper('FriendRequests'); 246 $friendRequests = $mapper->findAllByRequesterId($this->_foo->id); 247 248 $this->spec(count($friendRequests))->should->be(0); 249 } 250 232 251 /**#@-*/ 233 252 -
events/phpframework/piece_framework/trunk/specs/Phwittr/User/ProtectedUserSpec.php
r14775 r15303 59 59 $this->_createUserRecord($this->_foo); 60 60 $this->_createUserRecord($this->_bar); 61 $this->_baz->privateFlag = 1; 61 62 $this->_createUserRecord($this->_baz); 62 63 … … 136 137 } 137 138 139 public function itプライベートユーザがフォローしているユーザに対してはプロテクト状態にはならず、発言リストや個別を取得することができる() 140 { 141 $this->_createFollowerRecord($this->_baz->id, $this->_foo->id); 142 $this->_bazForFoo = new Phwittr_User($this->_baz->userName, $this->_foo->id); 143 144 $this->spec($this->_bazForFoo->isProtected())->should->beFalse(); 145 $statusList = $this->_bazForFoo->listArchives(); 146 $status = $this->_bazForFoo->findStatus(3); 147 148 $this->spec(count($statusList))->should->be(1); 149 $this->spec($status->userId)->should->be($this->_baz->id); 150 } 151 138 152 /**#@-*/ 139 153
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)