| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | public function testRemoveUser() |
||
| 21 | { |
||
| 22 | $chat = new ChatRoom(); |
||
| 23 | $user = new User(1); |
||
| 24 | $chat->addUser($user); |
||
| 25 | $chat->addUser(new User(2)); |
||
| 26 | $chat->addUser(new User(3)); |
||
| 27 | $chat->removeUser($user); |
||
| 28 | $this->assertEquals(2, sizeof($chat->getUsers()), |
||
| 29 | 'Chat should contain 2 users'); |
||
| 30 | $this->assertNotContains($user, $chat->getUsers(), |
||
| 31 | 'User should be removed from chat'); |
||
| 32 | } |
||
| 33 | } |