* @copyright 2014 Fabian Grutschus. All rights reserved. * @license BSD * @link http://github.com/fabiang/xmpp */ namespace Fabiang\Xmpp\Integration; use Behat\Behat\Context\BehatContext; class BindContext extends BehatContext { /** * @Given /^Test response data for bind$/ */ public function testResponseDataForBind() { $this->getConnection()->setData(array( "" . "", "", "" . "test@jabber.unister.de/12345678890" )); } /** * @Then /^request for binding send$/ */ public function requestForBindingSend() { $buffer = $this->getConnection()->getBuffer(); assertRegExp( '#^' . '' . '$#', $buffer[1] ); } /** * @Given /^Jid is set to options object$/ */ public function jidIsSetToOptionsObject() { assertSame('test@jabber.unister.de/12345678890', $this->getConnection()->getOptions()->getJid()); } /** * * @return \Fabiang\Xmpp\Connection\Test */ public function getConnection() { return $this->getMainContext()->getConnection(); } }