eZ\Bundle\EzPublishRestBundle\Tests\Functional\UserTest::testCreateSession PHP Method

testCreateSession() public method

public testCreateSession ( ) : string
return string The created session href
    public function testCreateSession()
    {
        self::markTestSkipped('@todo fixme');
        $text = $this->addTestSuffix('testCreateUser');
        $xml = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<SessionInput>
  <login>{$text}</login>
  <password>{$text}</password>
</SessionInput>
XML;
        $request = $this->createHttpRequest('POST', '/api/ezp/v2/user/sessions', 'SessionInput+xml', 'Session+json');
        $request->setContent($xml);
        $response = $this->sendHttpRequest($request);
        self::assertHttpResponseCodeEquals($response, 201);
        self::assertHttpResponseHasHeader($response, 'Location');
        $href = $response->getHeader('Location');
        $this->addCreatedElement($href);
        return $href;
    }