コード例 #1
0
 public function testSetGetCookie()
 {
     $dh = new AgaviWebRequestDataHolder(array());
     $dh->setCookie('foo', 'bar');
     $this->assertEquals('bar', $dh->getCookie('foo'));
     $dh->setCookie('foo', array('bar' => 'baz'));
     $this->assertEquals(array('bar' => 'baz'), $dh->getCookie('foo'));
     $this->assertEquals('baz', $dh->getCookie('foo[bar]'));
 }
コード例 #2
0
 /**
  * @dataProvider dataTestParameterSet
  */
 public function testSetParameter($setKey, $setValue, $readKey, $readValue)
 {
     $dh = new AgaviWebRequestDataHolder(array());
     $dh->setParameter($setKey, $setValue);
     $this->assertEquals($readValue, $dh->getParameter($readKey));
 }