-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
85015c1
commit 6fa8fc6
Showing
32 changed files
with
812 additions
and
874 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,16 +6,16 @@ | |
use GuzzleHttp\HandlerStack; | ||
use PHPUnit_Framework_TestCase; | ||
use UserAgentParser\Model\UserAgent; | ||
use UserAgentParser\Provider\AbstractProvider; | ||
|
||
/** | ||
* | ||
* | ||
* @author Martin Keckeis <[email protected]> | ||
* @license MIT | ||
*/ | ||
abstract class AbstractProviderTestCase extends PHPUnit_Framework_TestCase | ||
{ | ||
public function assertProviderResult($result, array $expectedResult) | ||
protected function assertProviderResult($result, array $expectedResult) | ||
{ | ||
$this->assertInstanceOf('UserAgentParser\Model\UserAgent', $result); | ||
|
||
|
@@ -25,6 +25,15 @@ public function assertProviderResult($result, array $expectedResult) | |
$this->assertEquals($result->toArray(), $expectedResult); | ||
} | ||
|
||
protected function assertIsRealResult(AbstractProvider $provider, $expected, $value, $group = null, $part = null) | ||
{ | ||
$reflection = new \ReflectionClass($provider); | ||
$method = $reflection->getMethod('isRealResult'); | ||
$method->setAccessible(true); | ||
|
||
$this->assertSame($expected, $method->invoke($provider, $value, $group, $part), $value); | ||
} | ||
|
||
/** | ||
* | ||
* @return Client | ||
|
Oops, something went wrong.