<commit_before><?php

namespace Versionable\Tests\Prospect\Cookie;

use Versionable\Prospect\Cookie\Cookie;

/**
 * Test class for Cookie.
 * Generated by PHPUnit on 2011-01-07 at 11:50:21.
 */
class CookieTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var Cookie
     */
    protected $object;

    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     */
    protected function setUp()
    {
        $this->object = new Cookie('test', 'foobar');
    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    protected function tearDown()
    {
    }
    
    public function testParse()
    {
      $this->object->parse('foo=bar; expires=Fri, 01-Apr-2011 00:00:00 GMT; path=/user/; domain=testing.com; secure; httponly;');
      
      $cookie = new Cookie('foo', 'bar', new \DateTime('01-Apr-2011 00:00:00 GMT'), '/user/', 'testing.com', true, true);
      
      $this->assertEquals($cookie, $this->object);
    }

    /**
     * @todo Implement test__toString().
     */
    public function test__toString()
    {
      $this->assertEquals($this->object->toString(), $this->object->__toString());
    }

    public function testToString()
    {
      $this->assertEquals($this->object->toString(), $this->object->__toString());
    }

    /**
     * @todo Implement testGetName().
     */
    public function testGetName()
    {
      $this->assertEquals($this->readAttribute($this->object, 'name'), $this->object->getName());
    }

    /**
     * @todo Implement testSetName().
     */<commit_msg>Fix for httponly test<commit_after><?php

namespace Versionable\Tests\Prospect\Cookie;

use Versionable\Prospect\Cookie\Cookie;

/**
 * Test class for Cookie.
 * Generated by PHPUnit on 2011-01-07 at 11:50:21.
 */
class CookieTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var Cookie
     */
    protected $object;

    /**
     * Sets up the fixture, for example, opens a network connection.
     * This method is called before a test is executed.
     */
    protected function setUp()
    {
        $this->object = new Cookie('test', 'foobar');
    }

    /**
     * Tears down the fixture, for example, closes a network connection.
     * This method is called after a test is executed.
     */
    protected function tearDown()
    {
    }
    
    public function testParse()
    {
      $this->object->parse('foo=bar; Expires=Fri, 01-Apr-2011 00:00:00 GMT; Path=/user/; Domain=testing.com; Secure; HttpOnly;');
      
      $cookie = new Cookie('foo', 'bar', new \DateTime('01-Apr-2011 00:00:00 GMT'), '/user/', 'testing.com', true, true);
      
      $this->assertEquals($cookie, $this->object);
    }

    /**
     * @todo Implement test__toString().
     */
    public function test__toString()
    {
      $this->assertEquals($this->object->toString(), $this->object->__toString());
    }

    public function testToString()
    {
      $this->assertEquals($this->object->toString(), $this->object->__toString());
    }

    /**
     * @todo Implement testGetName().
     */
    public function testGetName()
    {
      $this->assertEquals($this->readAttribute($this->object, 'name'), $this->object->getName());
    }

    /**
     * @todo Implement testSetName().
     */
{'fraction_non_alphanumeric': 0.15475487300649735, 'fraction_numerical': 0.02244536326048435, 'mean_word_length': 2.5955414012738856, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 43, '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': '4225986', 'n_tokens_mistral': 1085, 'n_tokens_neox': 997, 'n_words': 249}