lithium\tests\cases\net\http\ResponseTest::testSetCookiesMultipleValues PHP Method

testSetCookiesMultipleValues() public method

    public function testSetCookiesMultipleValues()
    {
        $response = new Response();
        $response->cookies(array('foo' => 'bar', 'bin' => 'baz'));
        $response->cookies('foo', array('value' => 'bin', 'path' => '/foo'));
        $expected = array('foo' => array(array('value' => 'bar'), array('value' => 'bin', 'path' => '/foo')), 'bin' => array('value' => 'baz'));
        $result = $response->cookies;
        $this->assertEqual($expected, $result);
        $response = new Response();
        $response->cookies(array('foo' => array('bar', array('value' => 'bin', 'path' => '/foo')), 'bin' => 'baz'));
        $result = $response->cookies;
        $this->assertEqual($expected, $result);
    }