Changeset 14099 for events/phpframework/piece_framework/trunk/specs
- Timestamp:
- 06/15/08 23:40:32 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
events/phpframework/piece_framework/trunk/specs/Phwittr/AccountSpec.php
r13523 r14099 52 52 */ 53 53 54 public function beforeAll() 55 { 56 parent::beforeAll(); 57 58 $this->_sampleImage = 'example.png'; 59 $this->_sampleDirectory = dirname(__FILE__) . '/AccountSpec'; 60 61 @unlink($this->_sampleDirectory . '/example_mini.png'); 62 @unlink($this->_sampleDirectory . '/example_normal.png'); 63 } 64 65 public function afterAll() 66 { 67 parent::afterAll(); 68 69 @unlink($this->_sampleDirectory . '/example_mini.png'); 70 @unlink($this->_sampleDirectory . '/example_normal.png'); 71 } 72 54 73 public function it基本情報が更新できる() 55 74 { … … 189 208 } 190 209 191 public function itユーザ画像も個別で更新() 192 { 193 $this->pending(); 210 public function itユーザ画像も個別更新で、オリジナルファイルパスを指定するとデータベースへの情報格納および24x24、48x48の画像が生成される() 211 { 212 $image = $this->_sampleDirectory . '/' . $this->_sampleImage; 213 214 $this->_createUserRecord($this->_foo); 215 216 $mapper = Piece_ORM::getMapper('Users'); 217 $user = $mapper->findByUserName($this->_foo->userName); 218 219 $account = new Phwittr_Account(); 220 $account->updatePicture($user->id, $image); 221 222 $newUser = $mapper->findById($user->id); 223 224 $this->spec($newUser->image)->should->be($this->_sampleImage); 225 $this->spec(file_exists($this->_sampleDirectory . '/example_mini.png')) 226 ->should->beTrue(); 227 $this->spec(file_exists($this->_sampleDirectory . '/example_normal.png')) 228 ->should->beTrue(); 194 229 } 195 230
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)