static function notify($a) { global $n; $engine = new \Inviqa\SkypeEngine($n); try { $engine->parse($a); } catch (Exception $e) { echo $e->getMessage() . PHP_EOL; } }
public function testWelcomeMessageIsSentAfterFriendRequestAccepted() { // mock the dbus object so we can simulate the linux skype client $dbus = $this->getMock('DbusObject', array('Invoke')); $this->expectSkype($dbus, 0, $this->equalTo('CHAT CREATE xyz,xyz'), 'CHAT xyz NAME'); $this->expectSkype($dbus, 1, $this->stringStartsWith('CHATMESSAGE xyz')); $this->expectSkype($dbus, 2, $this->stringStartsWith('ALTER CHATMEMBER xyz SETROLETO MASTER')); $e = new \Inviqa\SkypeEngine($dbus); $e->parse('USER xyz BUDDYSTATUS 3'); // skype api friend status update to accepted }