#!/usr/bin/env php phalApiCookie = new PhalApi_Cookie(); } protected function tearDown() { } /** * @group testGet */ public function testGet() { $key = NULL; $rs = $this->phalApiCookie->get($key); $this->assertTrue(is_array($rs)); $this->assertNull($this->phalApiCookie->get('noThisKey')); $_COOKIE['aKey'] = 'phalapi'; $key = 'aKey'; $this->assertEquals('phalapi', $this->phalApiCookie->get($key)); } /** * @group testSet */ public function testSet() { $key = 'bKey'; $value = '2015'; $rs = @$this->phalApiCookie->set($key, $value); //should not get in this time, but next time $this->assertNull($this->phalApiCookie->get($key)); } }