/** * @test */ public function shouldIncludeChatIdInSessionInfoWhenAvailable() { $question = new StudentQuestion(); $question->setTutor(new User()); $question->setStudent(new User()); $session = new WhiteboardSession(); $session->setStudentQuestion($question); $session->setChatId(999000999); $sessionInfo = $session->info(); $this->assertEquals(999000999, $sessionInfo['whiteboard-session']); }
protected function setUp() { parent::setUp(); $this->peer = new WhiteboardSessionPeer(); $question = new StudentQuestion(); $asker = new User(); $asker->save(); $question->setStudent($asker); $tutor = new User(); $tutor->save(); $question->setTutor($tutor); $question->save(); $this->session = new WhiteboardSession(); $this->session->setUser($asker); $this->session->setStudentQuestion($question); $this->session->setToken($this->token); $this->session->save(); }