From b82fb047ec30f7c883b3e28da64092160dc96130 Mon Sep 17 00:00:00 2001 From: Gabriel Bull Date: Mon, 7 Sep 2015 22:57:33 -0400 Subject: [PATCH 1/2] Update README.md --- README.md | 155 +----------------------------------------------------- 1 file changed, 1 insertion(+), 154 deletions(-) diff --git a/README.md b/README.md index ccd9a9b..cf7c501 100644 --- a/README.md +++ b/README.md @@ -1,154 +1 @@ -Browser Detector -================ - -[![Build Status](https://img.shields.io/travis/gabrielbull/php-browser/master.svg?style=flat)](https://travis-ci.org/gabrielbull/php-browser) -[![StyleCI](https://styleci.io/repos/3752453/shield)](https://styleci.io/repos/3752453) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/gabrielbull/php-browser/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/gabrielbull/php-browser/?branch=master) -[![Code Coverage](https://scrutinizer-ci.com/g/gabrielbull/php-browser/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/gabrielbull/php-browser/?branch=master) -[![Latest Stable Version](http://img.shields.io/packagist/v/gabrielbull/browser.svg?style=flat)](https://packagist.org/packages/gabrielbull/browser) -[![Total Downloads](https://img.shields.io/packagist/dt/gabrielbull/browser.svg?style=flat)](https://packagist.org/packages/gabrielbull/browser) -[![License](https://img.shields.io/packagist/l/gabrielbull/browser.svg?style=flat)](https://packagist.org/packages/gabrielbull/browser) -[![SensioLabsInsight](https://insight.sensiolabs.com/projects/91aa3b4f-c58a-46f9-8ac6-c17658084034/mini.png)](https://insight.sensiolabs.com/projects/91aa3b4f-c58a-46f9-8ac6-c17658084034) - -Detecting the user's browser, operating system, device and language from PHP. Because browser detection is not always -reliable and evolves at all time, use with care and feel free to contribute. - -## Requirements - -This library uses PHP 5.3+. - -## Install - -It is recommended that you install the PHP Browser library [through composer](http://getcomposer.org). To do so, add the following lines to your composer.json file. - -```JSON -{ - "require": { - "gabrielbull/browser": "^4.0" - } -} -``` - -## Browser Detection - -The Browser class allow you to detect a user's browser and version. - -### Browsers Detected - - * Opera - * Opera Mini - * WebTV - * Internet Explorer - * Pocket Internet Explorer - * Microsoft Edge - * Konqueror - * iCab - * OmniWeb - * Firebird - * Firefox - * Iceweasel - * Shiretoko - * Mozilla - * Amaya - * Lynx - * Safari - * Chrome - * Navigator - * GoogleBot - * Yahoo! Slurp - * W3C Validator - * BlackBerry - * IceCat - * Nokia S60 OSS Browser - * Nokia Browser - * MSN Browser - * MSN Bot - * Netscape Navigator - * Galeon - * NetPositive - * Phoenix - * SeaMonkey - * Yandex Browser - -### Usage - -```php -use Browser\Browser; - -$browser = new Browser; -if ($browser->getName() === $browser::IE && $browser->getVersion() < 8) { - echo 'Please upgrade your browser.'; -} -``` - -## OS Detection - -The OS class allow you to detect a user's operating system and version. - -### OS Detected - - * Windows - * OS X - * iOS - * Android - * Linux - * SymbOS - * Nokia - * BlackBerry - * FreeBSD - * OpenBSD - * NetBSD - * OpenSolaris - * SunOS - * OS2 - * BeOS - -### Usage - -```php -use Browser\Os; - -$os = new Os; -if ($os->getName() === $os::IOS) { - echo 'You are using an iOS device.'; -} -``` - -## Device Detection - -The Device class allow you to detect a user's device. - -### Device Detected - - * iPad - * iPhone - -### Usage - -```php -use Browser\Device; - -$device = new Device; -if ($device->getName() === $device::IPAD) { - echo 'You are using an iPad.'; -} -``` - -## Language Detection - -The Language class allow you to detect a user's language. - -### Usage - -```php -use Browser\Language; - -$language = new Language; -if ($language->getLanguage() === 'de') { - echo 'Get this website in german.'; -} -``` - -## License - -PHP Browser is licensed under [The MIT License (MIT)](LICENSE). +# [This project has moved to sinergi/php-browser-detector](https://github.com/sinergi/php-browser-detector) From b1b5bbb71782fa13b66266e95cfc6694b2d89b4e Mon Sep 17 00:00:00 2001 From: Gabriel Bull Date: Mon, 7 Sep 2015 23:05:51 -0400 Subject: [PATCH 2/2] Deleted unused files --- .gitattributes | 8 - .travis.yml | 24 --- CHANGELOG.md | 15 -- CONTRIBUTING.md | 32 ---- LICENSE | 20 -- phpunit.xml.dist | 26 --- tests/Browser/Tests/AcceptLanguageTest.php | 21 -- tests/Browser/Tests/BrowserDetectorTest.php | 19 -- tests/Browser/Tests/BrowserTest.php | 64 ------- tests/Browser/Tests/DeviceDetectorTest.php | 68 ------- tests/Browser/Tests/DeviceTest.php | 16 -- tests/Browser/Tests/LanguageTest.php | 59 ------ tests/Browser/Tests/OsDetectorTest.php | 19 -- tests/Browser/Tests/OsTest.php | 83 -------- tests/Browser/Tests/UserAgentTest.php | 21 -- .../Browser/Tests/_files/UserAgentStrings.xml | 132 ------------- .../Tests/_includes/UserAgentString.php | 181 ------------------ .../Tests/_includes/UserAgentStringMapper.php | 31 --- tests/bootstrap.php | 16 -- 19 files changed, 855 deletions(-) delete mode 100644 .gitattributes delete mode 100644 .travis.yml delete mode 100644 CHANGELOG.md delete mode 100644 CONTRIBUTING.md delete mode 100644 LICENSE delete mode 100644 phpunit.xml.dist delete mode 100644 tests/Browser/Tests/AcceptLanguageTest.php delete mode 100644 tests/Browser/Tests/BrowserDetectorTest.php delete mode 100644 tests/Browser/Tests/BrowserTest.php delete mode 100644 tests/Browser/Tests/DeviceDetectorTest.php delete mode 100644 tests/Browser/Tests/DeviceTest.php delete mode 100644 tests/Browser/Tests/LanguageTest.php delete mode 100644 tests/Browser/Tests/OsDetectorTest.php delete mode 100644 tests/Browser/Tests/OsTest.php delete mode 100644 tests/Browser/Tests/UserAgentTest.php delete mode 100644 tests/Browser/Tests/_files/UserAgentStrings.xml delete mode 100644 tests/Browser/Tests/_includes/UserAgentString.php delete mode 100644 tests/Browser/Tests/_includes/UserAgentStringMapper.php delete mode 100644 tests/bootstrap.php diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index f659224..0000000 --- a/.gitattributes +++ /dev/null @@ -1,8 +0,0 @@ -/tests export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore -/.travis.yml export-ignore -/phpunit.xml.dist export-ignore -/CHANGELOG.md export-ignore -/CONTRIBUTING.md export-ignore -/README.md export-ignore diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4397acc..0000000 --- a/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: php - -env: - - APP_ENV=travis - -php: - - 5.3.3 - - 5.4 - - 5.5 - - 5.6 - - hhvm - - nightly - -before_script: - ## Composer - - composer self-update - - composer install --prefer-source --no-interaction --dev - -script: - - phpunit - -matrix: - allow_failures: - - php: hhvm diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 58db694..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,15 +0,0 @@ -# CHANGELOG - -## 4.0.1 (released 2015-09-07) - -- Added Windows 10 detection -- Added more OS detection unit tests - -## 4.0.0 (released 2015-08-22) - -- Refactoring -- Detect Yandex browser -- Detect latest Opera Mini browser -- Detect iPhone Device -- More unit tests -- Microsoft Edge detection diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 0ca2ed1..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,32 +0,0 @@ -# CONTRIBUTING - -Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests. - -## Guidelines - -* Please follow the [PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) and [PHP-FIG Naming Conventions](https://github.com/php-fig/fig-standards/blob/master/bylaws/002-psr-naming-conventions.md). -* Ensure that the current tests pass, and if you've added something new, add the tests where relevant. -* Remember that we follow [SemVer](http://semver.org). If you are changing the behaviour, or the public api, you may need to update the docs. -* Send a coherent commit history, making sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash](http://git-scm.com/book/en/Git-Tools-Rewriting-History) them before submitting. -* You may also need to [rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) to avoid merge conflicts. - - -## Running Tests - -You will need an install of [Composer](https://getcomposer.org) before continuing. - -First, install the dependencies: - -```bash -$ composer install -``` - -Then run phpunit: - -```bash -$ vendor/bin/phpunit -``` - -If the test suite passes on your local machine you should be good to go. - -When you make a pull request, the tests will automatically be run again by [Travis CI](https://travis-ci.org/) on multiple php versions and hhvm. diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 7d713b4..0000000 --- a/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013-2015 Chris Schuld - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index 290a46b..0000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - ./tests - - - - - ./src - - - diff --git a/tests/Browser/Tests/AcceptLanguageTest.php b/tests/Browser/Tests/AcceptLanguageTest.php deleted file mode 100644 index 84cc860..0000000 --- a/tests/Browser/Tests/AcceptLanguageTest.php +++ /dev/null @@ -1,21 +0,0 @@ -assertNull($acceptLanguage->getAcceptLanguageString()); - - $acceptLanguage = new AcceptLanguage('my_accept_language_string'); - $this->assertEquals('my_accept_language_string', $acceptLanguage->getAcceptLanguageString()); - - $acceptLanguage->setAcceptLanguageString('my_new_accept_language_string'); - $this->assertEquals('my_new_accept_language_string', $acceptLanguage->getAcceptLanguageString()); - } -} diff --git a/tests/Browser/Tests/BrowserDetectorTest.php b/tests/Browser/Tests/BrowserDetectorTest.php deleted file mode 100644 index fd5ef1c..0000000 --- a/tests/Browser/Tests/BrowserDetectorTest.php +++ /dev/null @@ -1,19 +0,0 @@ -getString()); - $this->assertEquals($userAgentString->getBrowser(), $browser->getName()); - $this->assertEquals($userAgentString->getBrowserVersion(), $browser->getVersion()); - } - } -} diff --git a/tests/Browser/Tests/BrowserTest.php b/tests/Browser/Tests/BrowserTest.php deleted file mode 100644 index ec2ba0d..0000000 --- a/tests/Browser/Tests/BrowserTest.php +++ /dev/null @@ -1,64 +0,0 @@ -assertEquals(Browser::BLACKBERRY, $browser->getName()); - $this->assertEquals('4.5.0.124', $browser->getVersion()); - } - - public function testFirefox() - { - $browser = new Browser('Mozilla/5.0 (X11; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0'); - $this->assertEquals(Browser::FIREFOX, $browser->getName()); - $this->assertEquals('18.0', $browser->getVersion()); - } - - public function testInternetExplorer11() - { - $browser = new Browser('Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko'); - $this->assertEquals(Browser::IE, $browser->getName()); - $this->assertEquals('11.0', $browser->getVersion()); - - $browser = new Browser('Mozilla/5.0 (MSIE 9.0; Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko'); - $this->assertEquals(Browser::IE, $browser->getName()); - $this->assertEquals('11.0', $browser->getVersion()); - - $browser = new Browser('Mozilla/5.0 (MSIE 9.0; Windows NT 6.3; WOW64; Trident/7.0;) like Gecko'); - $this->assertEquals(Browser::IE, $browser->getName()); - $this->assertEquals('9.0', $browser->getVersion()); - } - - public function testSeaMonkey() - { - $browser = new Browser('Mozilla/5.0 (Windows; U; Windows NT 5.1; RW; rv:1.8.0.7) Gecko/20110321 MultiZilla/4.33.2.6a SeaMonkey/8.6.55'); - $this->assertEquals(Browser::SEAMONKEY, $browser->getName()); - $this->assertEquals('8.6.55', $browser->getVersion()); - } - - public function testUnknown() - { - $browser = new Browser(); - $this->assertEquals(Browser::UNKNOWN, $browser->getName()); - $this->assertEquals(Browser::VERSION_UNKNOWN, $browser->getVersion()); - } - - public function testOpera() - { - $browser = new Browser('Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14'); - $this->assertEquals(Browser::OPERA, $browser->getName()); - $this->assertEquals('12.14', $browser->getVersion()); - - $browser = new Browser('Mozilla/5.0 (SunOS 5.8 sun4u; U) Opera 5.0 [en]'); - $this->assertEquals(Browser::OPERA, $browser->getName()); - $this->assertEquals('5.0', $browser->getVersion()); - } -} diff --git a/tests/Browser/Tests/DeviceDetectorTest.php b/tests/Browser/Tests/DeviceDetectorTest.php deleted file mode 100644 index ef1a3a1..0000000 --- a/tests/Browser/Tests/DeviceDetectorTest.php +++ /dev/null @@ -1,68 +0,0 @@ -setUserAgent(new UserAgent($userAgentString->getString())); - $deviceDetector->detect($device); - - $this->assertEquals($userAgentString->getDevice(), $device->getName()); - $this->assertEquals($userAgentString->getDeviceVersion(), $device->getVersion()); - } - } - - public function testGetDevice() - { - $device = new Device(); - $deviceDetector = new DeviceDetector(); - - $deviceDetector->setUserAgent(new UserAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko/20100101 Firefox/35.0')); - - $deviceDetector->detect($device); - - $this->assertInstanceOf('\Browser\Device', $deviceDetector->getDevice()); - } - - public function testSetDevice() - { - $device = new Device(); - $deviceDetector = new DeviceDetector(); - - $deviceDetector->setDevice($device); - - $this->assertAttributeEquals($device, 'device', $deviceDetector); - } - - public function testSetUserAgent() - { - $userAgent = new UserAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko/20100101 Firefox/35.0'); - $deviceDetector = new DeviceDetector(); - - $deviceDetector->setUserAgent($userAgent); - - $this->assertAttributeEquals($userAgent, 'userAgent', $deviceDetector); - } - - public function testGetUserAgent() - { - $userAgent = new UserAgent('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko/20100101 Firefox/35.0'); - $deviceDetector = new DeviceDetector(); - - $deviceDetector->setUserAgent($userAgent); - - $this->assertEquals($userAgent, $deviceDetector->getUserAgent()); - } -} diff --git a/tests/Browser/Tests/DeviceTest.php b/tests/Browser/Tests/DeviceTest.php deleted file mode 100644 index a7451be..0000000 --- a/tests/Browser/Tests/DeviceTest.php +++ /dev/null @@ -1,16 +0,0 @@ -assertEquals(Device::UNKNOWN, $device->getName()); - $this->assertEquals(Device::UNKNOWN_VERSION, $device->getVersion()); - } -} diff --git a/tests/Browser/Tests/LanguageTest.php b/tests/Browser/Tests/LanguageTest.php deleted file mode 100644 index 76da72d..0000000 --- a/tests/Browser/Tests/LanguageTest.php +++ /dev/null @@ -1,59 +0,0 @@ -language = new Language($httpAcceptLanguage); - } - - public function testGetLanguage() - { - $this->assertEquals('fr', $this->language->getLanguage()); - } - - public function testGetLanguages() - { - $this->assertGreaterThan(0, count($this->language->getLanguages())); - } - - public function testGetLanguageLocal() - { - $this->assertEquals('fr-CA', $this->language->getLanguageLocale()); - } - - public function testConstructor() - { - $acceptLanguage = new AcceptLanguage('my_accept_language_string'); - $language = new Language($acceptLanguage); - - $this->assertInstanceOf('\Browser\AcceptLanguage', $acceptLanguage); - $this->assertInstanceOf('\Browser\Language', $language); - } - - /** - * @expectedException \Browser\InvalidArgumentException - */ - public function testConstructorException() - { - $language = new Language(1); - } - - public function testGetLanguageLocale() - { - $language = new Language('ru,en-us;q=0.5,en;q=0.3'); - $this->assertEquals('ru', $language->getLanguageLocale()); - } -} diff --git a/tests/Browser/Tests/OsDetectorTest.php b/tests/Browser/Tests/OsDetectorTest.php deleted file mode 100644 index 7b39d5f..0000000 --- a/tests/Browser/Tests/OsDetectorTest.php +++ /dev/null @@ -1,19 +0,0 @@ -getString()); - $this->assertEquals($userAgentString->getOs(), $os->getName()); - $this->assertEquals($userAgentString->getosVersion(), $os->getVersion()); - } - } -} diff --git a/tests/Browser/Tests/OsTest.php b/tests/Browser/Tests/OsTest.php deleted file mode 100644 index c79e70a..0000000 --- a/tests/Browser/Tests/OsTest.php +++ /dev/null @@ -1,83 +0,0 @@ -assertEquals(Os::IOS, $os->getName()); - $this->assertEquals('6.0', $os->getVersion()); - } - - public function testOsX() - { - $os = new Os('Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17'); - $this->assertEquals(Os::OSX, $os->getName()); - $this->assertEquals('10.8.2', $os->getVersion()); - } - - public function testOsX1010() - { - $os = new Os('Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:34.0) Gecko/20100101 Firefox/34.0'); - $this->assertEquals(Os::OSX, $os->getName()); - $this->assertEquals('10.10', $os->getVersion()); - } - - public function testBlackberry() - { - $os = new Os('Mozilla/5.0 (BlackBerry; U; BlackBerry 9900; en) AppleWebKit/534.11+ (KHTML, like Gecko) Version/7.1.0.346 Mobile Safari/534.11+'); - $this->assertEquals(Os::BLACKBERRY, $os->getName()); - $this->assertEquals(Os::VERSION_UNKNOWN, $os->getVersion()); - } - - public function testIsMobile() - { - $os = new Os('Mozilla/5.0 (iPod; CPU iPhone OS 6_1_3 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) CriOS/28.0.1500.16 Mobile/10B329 Safari/8536.25'); - $this->assertTrue($os->isMobile()); - } - - public function testWindows() - { - $os = new Os('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)'); - $this->assertEquals(Os::WINDOWS, $os->getName()); - $this->assertEquals('7', $os->getVersion()); - } - - public function testConstructor() - { - $userAgent = new UserAgent('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)'); - $os = new Os($userAgent); - - $this->assertInstanceOf('\Browser\Os', $os); - } - - /** - * @expectedException \Browser\InvalidArgumentException - */ - public function testConstructorException() - { - $os = new Os(1); - } - - public function testGetVersion() - { - $userAgent = new UserAgent('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)'); - $os = new Os($userAgent); - - $this->assertEquals('7', $os->getVersion()); - } - - public function testUnknown() - { - $os = new Os(''); - $this->assertEquals(Os::UNKNOWN, $os->getName()); - $this->assertEquals(Os::VERSION_UNKNOWN, $os->getVersion()); - } -} diff --git a/tests/Browser/Tests/UserAgentTest.php b/tests/Browser/Tests/UserAgentTest.php deleted file mode 100644 index d41eabb..0000000 --- a/tests/Browser/Tests/UserAgentTest.php +++ /dev/null @@ -1,21 +0,0 @@ -assertNull($userAgent->getUserAgentString()); - - $userAgent = new UserAgent('my_agent_user_string'); - $this->assertEquals('my_agent_user_string', $userAgent->getUserAgentString()); - - $userAgent->setUserAgentString('my_new_agent_user_string'); - $this->assertEquals('my_new_agent_user_string', $userAgent->getUserAgentString()); - } -} diff --git a/tests/Browser/Tests/_files/UserAgentStrings.xml b/tests/Browser/Tests/_files/UserAgentStrings.xml deleted file mode 100644 index ff42ca1..0000000 --- a/tests/Browser/Tests/_files/UserAgentStrings.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - Opera - 21.0.1432.67 - OS X - 10.9.3 - unknown - unknown - - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) - Chrome/34.0.1847.132 Safari/537.36 OPR/21.0.1432.67 - - - - Safari - 4.0.4 - iOS - 3.2 - iPad - unknown - - Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) - Version/4.0.4 Mobile/7B314 Safari/531.21.10gin_lib.cc - - - - Safari - 8.0 - iOS - 8.1.2 - iPhone - unknown - - Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) - Version/8.0 Mobile/12B440 Safari/600.1.4 - - - - Chrome - 41.0.2272.118 - OS X - 10.10.2 - unknown - unknown - - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) - Chrome/41.0.2272.118 Safari/537.36 - - - - Yandex - 15.6.2311.3451 - OS X - 10.10.2 - unknown - unknown - - Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) - Chrome/42.0.2311.152 YaBrowser/15.6.2311.3451 (beta) Yowser/2.0 Safari/537.36 - - - - Internet Explorer - 8.0 - Windows - 7 - unknown - unknown - - Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; - .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0) - - - - Firefox - 35.0 - OS X - 10.10 - unknown - unknown - - Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:35.0) Gecko/20100101 Firefox/35.0 - - - - Opera Mini - 10.1.1.92212 - iOS - 8.1.2 - iPhone - unknown - - Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) - OPiOS/10.1.1.92212 Mobile/12B440 Safari/9537.53 - - - - Chrome - 43.0.2357.51 - iOS - 8.1.2 - iPhone - unknown - - Mozilla/5.0 (iPhone; CPU iPhone OS 8_1_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) CriOS/43.0.2357.51 Mobile/12B440 Safari/600.1.4 - - - - Edge - 12.10136 - Windows - 10.0 - unknown - unknown - - Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136 - - - Firefox - 40.0 - Windows - 10.0 - unknown - unknown - - Mozilla/5.0 (Windows NT 10.0; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 - - - - diff --git a/tests/Browser/Tests/_includes/UserAgentString.php b/tests/Browser/Tests/_includes/UserAgentString.php deleted file mode 100644 index 7397d5a..0000000 --- a/tests/Browser/Tests/_includes/UserAgentString.php +++ /dev/null @@ -1,181 +0,0 @@ -browser; - } - - /** - * @param string $browser - * - * @return $this - */ - public function setBrowser($browser) - { - $this->browser = $browser; - - return $this; - } - - /** - * @return string - */ - public function getOs() - { - return $this->os; - } - - /** - * @param string $os - * - * @return $this - */ - public function setOs($os) - { - $this->os = $os; - - return $this; - } - - /** - * @return string - */ - public function getosVersion() - { - return $this->osVersion; - } - - /** - * @param string $osVersion - * - * @return $this - */ - public function setosVersion($osVersion) - { - $this->osVersion = $osVersion; - - return $this; - } - - /** - * @return string - */ - public function getString() - { - return $this->string; - } - - /** - * @param string $string - * - * @return $this - */ - public function setString($string) - { - $this->string = $string; - - return $this; - } - - /** - * @return string - */ - public function getbrowserVersion() - { - return $this->browserVersion; - } - - /** - * @param string $browserVersion - * - * @return $this - */ - public function setbrowserVersion($browserVersion) - { - $this->browserVersion = $browserVersion; - - return $this; - } - - /** - * @return string - */ - public function getDevice() - { - return $this->device; - } - - /** - * @param string $device - * - * @return $this - */ - public function setDevice($device) - { - $this->device = $device; - - return $this; - } - - /** - * @return string - */ - public function getDeviceVersion() - { - return $this->deviceVersion; - } - - /** - * @param string $deviceVersion - * - * @return $this - */ - public function setDeviceVersion($deviceVersion) - { - $this->deviceVersion = $deviceVersion; - - return $this; - } -} diff --git a/tests/Browser/Tests/_includes/UserAgentStringMapper.php b/tests/Browser/Tests/_includes/UserAgentStringMapper.php deleted file mode 100644 index 960a91b..0000000 --- a/tests/Browser/Tests/_includes/UserAgentStringMapper.php +++ /dev/null @@ -1,31 +0,0 @@ -strings->string as $string) { - $string = $string->field; - $userAgentString = new UserAgentString(); - $userAgentString->setBrowser((string) $string[0]); - $userAgentString->setBrowserVersion((string) $string[1]); - $userAgentString->setOs((string) $string[2]); - $userAgentString->setOsVersion((string) $string[3]); - $userAgentString->setDevice((string) $string[4]); - $userAgentString->setDeviceVersion((string) $string[5]); - $userAgentString->setString(str_replace(array(PHP_EOL, ' '), ' ', (string) $string[6])); - $collection[] = $userAgentString; - } - - return $collection; - } -} diff --git a/tests/bootstrap.php b/tests/bootstrap.php deleted file mode 100644 index e275dd1..0000000 --- a/tests/bootstrap.php +++ /dev/null @@ -1,16 +0,0 @@ -