Horde_ActiveSync_StateTest_Base::_testListDevices PHP Method

_testListDevices() protected method

protected _testListDevices ( ) : [type]
return [type]
    protected function _testListDevices()
    {
        $devices = self::$state->listDevices();
        $this->assertCount(1, $devices);
        $deviceInfo = new Horde_ActiveSync_Device(self::$state);
        $deviceInfo->rwstatus = 0;
        $deviceInfo->deviceType = 'Test Device';
        $deviceInfo->userAgent = 'Horde Tests';
        $deviceInfo->id = 'dev123';
        $deviceInfo->user = 'ashley';
        $deviceInfo->policykey = 123;
        $deviceInfo->supported = array();
        $deviceInfo->save();
        $devices = self::$state->listDevices();
        $this->assertCount(2, $devices);
    }