<commit_before><?php
require_once(dirname(__FILE__) . '/../inc/baseCase.php');

class jackalope_tests_Session extends jackalope_baseCase {
    public function testConstructor() {
        $repository = $this->getMock('jackalope_Repository', array(), array(), '', false);
        $workspaceName = 'asdfads';
        $userID = 'abcd';
        $cred = new PHPCR_SimpleCredentials($userID, 'xxxx');
        $cred->setAttribute('test', 'toast');
        $cred->setAttribute('other', 'value');
        //TODO: Fix this
        $transport = new jackalope_transport_DavexClient('http://example.com');
        $s = new jackalope_Session($repository, $workspaceName, $cred, $transport);
        $this->assertSame($repository, $s->getRepository());
        $this->assertEquals($userID, $s->getUserID());
        $this->assertEquals(array('test', 'other'), $s->getAttributeNames());
        $this->assertEquals('toast', $s->getAttribute('test'));
        $this->assertEquals('value', $s->getAttribute('other'));
        
        $s->getNode('/jcr:root/tests_level1_access_base/idExample');
    }
    public function testLogout() {
        $this->markTestSkipped();
        //TODO: test flush object manager with the help of mock objects
    }
}<commit_msg>Removed my session / node tryout<commit_after><?php
require_once(dirname(__FILE__) . '/../inc/baseCase.php');

class jackalope_tests_Session extends jackalope_baseCase {
    public function testConstructor() {
        $repository = $this->getMock('jackalope_Repository', array(), array(), '', false);
        $workspaceName = 'asdfads';
        $userID = 'abcd';
        $cred = new PHPCR_SimpleCredentials($userID, 'xxxx');
        $cred->setAttribute('test', 'toast');
        $cred->setAttribute('other', 'value');
        //TODO: Fix this
        $transport = new jackalope_transport_DavexClient('http://example.com');
        $s = new jackalope_Session($repository, $workspaceName, $cred, $transport);
        $this->assertSame($repository, $s->getRepository());
        $this->assertEquals($userID, $s->getUserID());
        $this->assertEquals(array('test', 'other'), $s->getAttributeNames());
        $this->assertEquals('toast', $s->getAttribute('test'));
        $this->assertEquals('value', $s->getAttribute('other'));
    }
    public function testLogout() {
        $this->markTestSkipped();
        //TODO: test flush object manager with the help of mock objects
    }
}
{'fraction_non_alphanumeric': 0.17181705809641531, 'fraction_numerical': 0.00041203131437989287, 'mean_word_length': 3.5725047080979286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6419696', 'n_tokens_mistral': 694, 'n_tokens_neox': 703, 'n_words': 135}