Beispiel #1
0
 public function testCreateNode()
 {
     $this->object->setTo('393921234567');
     $this->object->setState('test-state');
     $ret = $this->object->createNode();
     $this->assertInstanceOf('Tmv\\WhatsApi\\Message\\Node\\Node', $ret);
     $expected = array('name' => 'chatstate', 'attributes' => array('to' => '*****@*****.**'), 'data' => NULL, 'children' => array(array('name' => 'test-state', 'attributes' => array(), 'data' => NULL, 'children' => array())));
     $this->assertEquals($expected, $ret->toArray());
 }