Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Add ability to call canOpenURL: during waitForApplicationToOpenURL bl…

…ocks

This further enhances the behavior introduced in
#588

When mocking openURL:, it also makes sense to be able to call
canOpenURL: and receive consistent results.

For example:

```objectivec
[system waitForApplicationToOpenURL:@"test123://" whileExecutingBlock:^{
    NSURL *URL = [NSURL URLWithString:@"test123://"];
    NSAssert([[UIApplication sharedApplication] openURL:URL],
             @"You can open the URL");
    NSAssert([[UIApplication sharedApplication] canOpenURL:URL],
             @"You can also check the URL");
} returning:YES];
```

- Whenever openURL: is swizzled, also swizzle canOpenURL:
- When canOpenURL: is called, an NSNotification is posted
- The notification handler checks whether the URL matches,
  - possibly failing the test,
  - but leaving the openURL: mocking in place
latest commit 030f0ba995
@mickeyreiss mickeyreiss authored
..
Failed to load latest commit information.
CGGeometry-KIFAdditions.h Update the headers of every file to accurately reflect the licensing …
CGGeometry-KIFAdditions.m Update the headers of every file to accurately reflect the licensing …
LoadableCategory.h Add a superclass to the dummy object in loadable categories to make i…
NSBundle-KIFAdditions.h More improvements for extensions.
NSBundle-KIFAdditions.m More improvements for extensions.
NSError-KIFAdditions.h Broke down API to be even more modular. Further shortened error methods.
NSError-KIFAdditions.m Merge pull request #369 from InsertWittyName/NilErrorFix
NSException-KIFAdditions.h Add XCTest compatibility
NSException-KIFAdditions.m Add XCTest compatibility
NSFileManager-KIFAdditions.h Fix category name prefix
NSFileManager-KIFAdditions.m Modernize some syntax.
SenTestCase-KIFAdditions.h Moved core functionality from KIFTestCase to SenTestCase (KIFAdditions).
SenTestCase-KIFAdditions.m Made SenTestCase (KIFAdditions) loadable.
UIAccessibilityElement-KIFAdditions.h Conditional tests
UIAccessibilityElement-KIFAdditions.m Revert "fix hidden check to use also alpha value"
UIApplication-KIFAdditions.h Add ability to call canOpenURL: during waitForApplicationToOpenURL bl…
UIApplication-KIFAdditions.m Add ability to call canOpenURL: during waitForApplicationToOpenURL bl…
UIEvent+KIFAdditions.h Make touch UIEvent compatible with iOS 8.3
UIEvent+KIFAdditions.m Make touch UIEvent compatible with iOS 8.3
UIScrollView-KIFAdditions.h Update the headers of every file to accurately reflect the licensing …
UIScrollView-KIFAdditions.m Fix scrolling up or left to reveal a view.
UITableView-KIFAdditions.h fix analyzer warnings:
UITableView-KIFAdditions.m fix analyzer warnings:
UITouch-KIFAdditions.h Fixed ivar free KIF on iOS6.
UITouch-KIFAdditions.m Fixed ivar free KIF on iOS6.
UIView-KIFAdditions.h Added printViewHierarchy to the UIView category.
UIView-KIFAdditions.m Merge pull request #607 from SebastianMecklenburg/printViewHierarchy
UIWindow-KIFAdditions.h Update the headers of every file to accurately reflect the licensing …
UIWindow-KIFAdditions.m Update the headers of every file to accurately reflect the licensing …
XCTestCase-KIFAdditions.h Add XCTest compatibility
XCTestCase-KIFAdditions.m Guard against using iOS 8 APIs in Xcode < 6
Something went wrong with that request. Please try again.