Commit 222f07be authored by 汪洋's avatar 汪洋

save progress

parent efbbe85b
......@@ -8,7 +8,6 @@ inhibit_all_warnings!
target 'GMPhobos_Example' do
pod 'GMPhobos', :path => '../'
pod 'GMCache', '0.2.0'
target 'GMPhobos_Tests' do
inherit! :search_paths
end
......
......@@ -36,7 +36,7 @@ PODS:
- Masonry (= 1.1.0)
- SDWebImage (= 3.7.6)
- GMPhobos (0.5.4):
- GMCache
- GMCache (= 0.2.0)
- GMKit
- Masonry (1.1.0)
- SDWebImage (3.7.6):
......@@ -45,7 +45,6 @@ PODS:
- TMCache (2.1.0)
DEPENDENCIES:
- GMCache (= 0.2.0)
- GMPhobos (from `../`)
EXTERNAL SOURCES:
......@@ -55,11 +54,11 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
GMCache: b7d48432ee2469eb0c6c86c720a1958bd373187e
GMKit: a30da06b84e5c4a357d427c70d1b5ec672a1f6a1
GMPhobos: 9549afe9e949fadc2ac54e4bb26cb4c2519cd417
GMPhobos: c188895332709d25d1c25fc6efe584bb669e8420
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
SDWebImage: c325cf02c30337336b95beff20a13df489ec0ec9
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
PODFILE CHECKSUM: 88bad4cf7811c4caa54519587b95fcc2e18bc404
PODFILE CHECKSUM: ea0fac2144ac80baf8f21576cde49526c19991ad
COCOAPODS: 1.4.0
......@@ -8,9 +8,9 @@
#import <XCTest/XCTest.h>
#import <GMPhobos/Phobos.h>
#import <GMCache/WMCacheService.h>
#import "GMPhobosController.h"
#define PhobosCacheKey @"PhobosCacheKey"
@import GMCache;
NSString *const MockAppName = @"gengmei_test";
NSString *const MockChannelId = @"AppStore";
......@@ -20,7 +20,6 @@ NSString *const MockCityId = @"beijing";
@interface GMPhotoTest : XCTestCase
@property Phobos *client;
@property WMCacheService *cache;
@end
@implementation GMPhotoTest
......@@ -29,14 +28,12 @@ NSString *const MockCityId = @"beijing";
[super setUp];
_client = [Phobos clientWithAppName:MockAppName channelId:MockChannelId];
[Phobos setSharedClient:_client];
_cache = [WMCacheService sharedInstance];
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
[_cache removeObjectAtDucmentPathWithkey:PhobosCacheKey];
[GMCache removeObjectAtDucmentPathWithkey:PhobosCacheKey];
}
/**
......@@ -48,7 +45,7 @@ NSString *const MockCityId = @"beijing";
[_client setUserId:MockUserId];
[_client setCurrentCityId:MockCityId];
[Phobos track:MockEventId];
NSArray *array = [_cache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 1, @"array is empty");
NSDictionary *dict = [array objectAtIndex:0];
[self verfiyDict:dict];
......@@ -62,7 +59,7 @@ NSString *const MockCityId = @"beijing";
*/
- (void)testTrackEventWithoutAttr{
[Phobos track:MockEventId];
NSArray *array = [_cache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 1, @"array is empty");
NSDictionary *dict = [array objectAtIndex:0];
[self verfiyDict:dict];
......@@ -77,7 +74,7 @@ NSString *const MockCityId = @"beijing";
- (void)testTrackEventWithAttr{
NSDictionary *attr = @{@"attr":@"track_attr"};
[Phobos track:MockEventId attributes:attr];
NSArray *array = [_cache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 1, @"array is empty");
NSDictionary *dict = [array objectAtIndex:0];
[self verfiyDict:dict];
......@@ -98,7 +95,7 @@ NSString *const MockCityId = @"beijing";
// When
[Phobos track:MockEventId attributes:attr sendNow:YES];
// Then
NSArray *array = [_cache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count == 0, @"array should be empty");
}
......@@ -142,7 +139,7 @@ NSString *const MockCityId = @"beijing";
[controller viewWillAppear:true];
[controller viewWillDisappear:true];
[self paramUnNilCheck];
NSArray *array = [[WMCacheService sharedInstance] fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count != 0, @"PhobosCacheKey 下面应该有数据");
NSDictionary *dic = array[0][@"params"];
......@@ -156,7 +153,7 @@ NSString *const MockCityId = @"beijing";
}
- (void)paramUnNilCheck {
NSArray *array = [[WMCacheService sharedInstance] fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
NSArray *array = [GMCache fetchObjectAtDucmentPathWithkey:PhobosCacheKey];
XCTAssertTrue(array.count != 0, @"PhobosCacheKey 下面应该有数据");
NSDictionary *dic = array[0][@"params"];
......
......@@ -18,17 +18,13 @@ Pod::Spec.new do |s|
DESC
s.homepage = "http://git.wanmeizhensuo.com/gengmeiios/GMPhobos"
# s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
s.license = 'MIT'
s.author = { "licong" => "licong@gmei.com" }
s.source = { :git => "git@git.wanmeizhensuo.com:gengmeiios/GMPhobos.git", :tag => s.version.to_s }
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
s.platform = :ios, '8.0'
s.requires_arc = true
s.source_files = 'Pod/Classes/**/*'
s.dependency 'GMCache'
s.source_files = 'GMPhobos/Classes/*.{h,m}'
s.dependency 'GMCache', '0.2.0'
s.dependency 'GMKit'
s.library = 'z'
......
......@@ -9,7 +9,7 @@ Phobos is named after the Greek god Phobos, a son of Ares (Mars) and Aphrodite (
The name "Phobos" is pronounced /ˈfoʊbəs/ foh-bəs, or like the Greek Φόβος.
## Requirements
Require WMCacheService and libz
Require GMCache and libz
## Installation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment