| | 56 | |
| | 57 | $this->_createUserRecord($this->_foo); |
| | 58 | $this->_createUserRecord($this->_bar); |
| | 59 | $this->_createUserRecord($this->_baz); |
| | 60 | |
| | 61 | $mapper = Piece_ORM::getMapper('Users'); |
| | 62 | $this->_foo = $mapper->findByUserName($this->_foo->userName); |
| | 63 | $this->_bar = $mapper->findByUserName($this->_bar->userName); |
| | 64 | $this->_baz = $mapper->findByUserName($this->_baz->userName); |
| | 65 | |
| | 66 | for ($i = 0; $i < 100; ++$i) { |
| | 67 | $this->_createStatusRecord($this->_foo->id, $i + 2, |
| | 68 | sprintf('foo%d', $i), $i |
| | 69 | ); |
| | 70 | } |
| | 71 | $this->_createStatusRecord($this->_bar->id, null, 'bar1', 1000); |
| | 72 | $this->_createStatusRecord($this->_baz->id, null, 'baz1', 1001); |
| | 73 | |
| | 74 | $this->_createFollowerRecord($this->_foo->id, $this->_bar->id); |
| | 75 | $this->_createFollowerRecord($this->_bar->id, $this->_foo->id); |
| | 76 | $this->_createFollowerRecord($this->_baz->id, $this->_foo->id); |
| | 77 | |
| | 78 | for ($i = 0; $i < 100; ++$i) { |
| | 79 | $basename = sprintf('user%d', $i); |
| | 80 | |
| | 81 | $mockUser = new stdClass(); |
| | 82 | $mockUser->userName = $basename; |
| | 83 | $mockUser->email = "{$basename}@example.com"; |
| | 84 | $mockUser->password = sha1($basename); |
| | 85 | $mockUser->image = "{$basename}.jpg"; |
| | 86 | $mockUser->registrationKey = 1; |
| | 87 | $mockId = $this->_createUserRecord($mockUser); |
| | 88 | $this->_createFollowerRecord($this->_foo->id, $mockId); |
| | 89 | $this->_createFollowerRecord($mockId, $this->_foo->id); |
| | 90 | } |