diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2016-08-29 07:01:46 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2016-08-29 07:01:46 +0300 |
commit | 4c9d1274408fb57d5e0b53dcda425dc4892c7b00 (patch) | |
tree | 78b0f24058d586cdd109de0387d43165e112003e /tests/PHPUnit/Framework | |
parent | 0c9c30b731ccbacf47e154b9f7a590af49e3d799 (diff) | |
parent | 4b395d2385e0041973349c7575fc10378b85558e (diff) |
Merge branch 'master' into 3.0-m06
Conflicts:
.travis.yml
bower.json
core/Notification/Manager.php
core/Updates.php
core/Updates/2.16.2-b2.php
core/Version.php
libs/Zend/Validate/Hostname.php
libs/bower_components/jScrollPane/ajax.html
libs/bower_components/jScrollPane/anchors.html
libs/bower_components/jScrollPane/api.html
libs/bower_components/jScrollPane/arrow_hover.html
libs/bower_components/jScrollPane/arrow_positions.html
libs/bower_components/jScrollPane/arrows.html
libs/bower_components/jScrollPane/auto_reinitialise.html
libs/bower_components/jScrollPane/basic.html
libs/bower_components/jScrollPane/caps.html
libs/bower_components/jScrollPane/changelog.html
libs/bower_components/jScrollPane/destroy.html
libs/bower_components/jScrollPane/drag_size.html
libs/bower_components/jScrollPane/dynamic_content.html
libs/bower_components/jScrollPane/dynamic_height.html
libs/bower_components/jScrollPane/dynamic_width.html
libs/bower_components/jScrollPane/events.html
libs/bower_components/jScrollPane/faqs.html
libs/bower_components/jScrollPane/fixed_width.html
libs/bower_components/jScrollPane/focus.html
libs/bower_components/jScrollPane/fullpage_scroll.html
libs/bower_components/jScrollPane/iframe.html
libs/bower_components/jScrollPane/iframe2.html
libs/bower_components/jScrollPane/iframe_content1.html
libs/bower_components/jScrollPane/iframe_content2.html
libs/bower_components/jScrollPane/image.html
libs/bower_components/jScrollPane/image2.html
libs/bower_components/jScrollPane/index.html
libs/bower_components/jScrollPane/invisibles.html
libs/bower_components/jScrollPane/known_issues.html
libs/bower_components/jScrollPane/less_basic.html
libs/bower_components/jScrollPane/mwheel_intent.html
libs/bower_components/jScrollPane/override_animate.html
libs/bower_components/jScrollPane/runeimp.html
libs/bower_components/jScrollPane/runeimp2.html
libs/bower_components/jScrollPane/scroll_on_left.html
libs/bower_components/jScrollPane/scroll_to.html
libs/bower_components/jScrollPane/scroll_to_animate.html
libs/bower_components/jScrollPane/settings.html
libs/bower_components/jScrollPane/short.html
libs/bower_components/jquery/.bower.json
libs/bower_components/jquery/LICENSE.txt
libs/bower_components/jquery/dist/jquery.js
libs/bower_components/jquery/dist/jquery.min.js
libs/bower_components/jquery/dist/jquery.min.map
libs/bower_components/jquery/sizzle/dist/sizzle.js
libs/bower_components/jquery/src/ajax.js
libs/bower_components/jquery/src/ajax/jsonp.js
libs/bower_components/jquery/src/ajax/load.js
libs/bower_components/jquery/src/ajax/parseJSON.js
libs/bower_components/jquery/src/ajax/parseXML.js
libs/bower_components/jquery/src/ajax/script.js
libs/bower_components/jquery/src/ajax/xhr.js
libs/bower_components/jquery/src/attributes/attr.js
libs/bower_components/jquery/src/attributes/classes.js
libs/bower_components/jquery/src/attributes/prop.js
libs/bower_components/jquery/src/attributes/support.js
libs/bower_components/jquery/src/attributes/val.js
libs/bower_components/jquery/src/callbacks.js
libs/bower_components/jquery/src/core.js
libs/bower_components/jquery/src/core/access.js
libs/bower_components/jquery/src/core/init.js
libs/bower_components/jquery/src/core/parseHTML.js
libs/bower_components/jquery/src/core/ready.js
libs/bower_components/jquery/src/css.js
libs/bower_components/jquery/src/css/curCSS.js
libs/bower_components/jquery/src/css/hiddenVisibleSelectors.js
libs/bower_components/jquery/src/css/support.js
libs/bower_components/jquery/src/css/var/swap.js
libs/bower_components/jquery/src/data.js
libs/bower_components/jquery/src/data/accepts.js
libs/bower_components/jquery/src/deferred.js
libs/bower_components/jquery/src/deprecated.js
libs/bower_components/jquery/src/dimensions.js
libs/bower_components/jquery/src/effects.js
libs/bower_components/jquery/src/effects/Tween.js
libs/bower_components/jquery/src/event.js
libs/bower_components/jquery/src/event/support.js
libs/bower_components/jquery/src/manipulation.js
libs/bower_components/jquery/src/manipulation/support.js
libs/bower_components/jquery/src/offset.js
libs/bower_components/jquery/src/queue.js
libs/bower_components/jquery/src/serialize.js
libs/bower_components/jquery/src/traversing.js
libs/bower_components/jquery/src/traversing/findFilter.js
libs/bower_components/jquery/src/var/concat.js
libs/bower_components/jquery/src/var/indexOf.js
libs/bower_components/jquery/src/var/push.js
libs/bower_components/jquery/src/var/slice.js
libs/bower_components/jquery/src/wrap.js
plugins/API/ProcessedReport.php
plugins/AnonymousPiwikUsageMeasurement
plugins/CoreConsole/Commands/ManagePlugin.php
plugins/CoreHome/javascripts/dataTable.js
plugins/CoreHome/javascripts/manifest.json
plugins/CoreHome/templates/_topBar.twig
plugins/CoreUpdater/templates/updateSuccess.twig
plugins/CustomAlerts
plugins/CustomDimensions
plugins/DevicesDetection/Reports/GetBrowserVersions.php
plugins/DevicesDetection/Reports/GetBrowsers.php
plugins/ExamplePlugin/Updates/0.0.2.php
plugins/Feedback/templates/index.twig
plugins/LogViewer
plugins/Morpheus/stylesheets/general/_forms.less
plugins/Morpheus/templates/layout.twig
plugins/Morpheus/templates/user.twig
plugins/QueuedTracking
plugins/SegmentEditor/stylesheets/segmentation.less
plugins/SitesManager/tests/Integration/ApiTest.php
tests/PHPUnit/Integration/WidgetsListTest.php
tests/PHPUnit/System/expected/test_ManyVisitorsOneWebsiteTest_sortByProcessedMetric__API.getProcessedReport_day.xml
tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_hideColumns___API.getProcessedReport_day.xml
tests/PHPUnit/System/expected/test_OneVisitorTwoVisits_showColumns___API.getProcessedReport_day.xml
tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_csv__ScheduledReports.generateReport_month.original.csv
tests/PHPUnit/System/expected/test_TwoVisitors_twoWebsites_differentDays_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_month.original.html
tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getReportMetadata_day.xml
tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_csv__ScheduledReports.generateReport_week.original.csv
tests/PHPUnit/System/expected/test_ecommerceOrderWithItems_scheduled_report_in_html_tables_only__ScheduledReports.generateReport_week.original.html
tests/UI/expected-ui-screenshots
tests/UI/specs/SegmentSelectorEditor_spec.js
Diffstat (limited to 'tests/PHPUnit/Framework')
-rw-r--r-- | tests/PHPUnit/Framework/Fixture.php | 10 | ||||
-rw-r--r-- | tests/PHPUnit/Framework/Mock/Plugin/LogTablesProvider.php | 28 | ||||
-rw-r--r-- | tests/PHPUnit/Framework/Mock/ProfessionalServices/Advertising.php (renamed from tests/PHPUnit/Framework/Mock/PiwikPro/Advertising.php) | 6 | ||||
-rwxr-xr-x | tests/PHPUnit/Framework/TestCase/SystemTestCase.php | 1 | ||||
-rw-r--r-- | tests/PHPUnit/Framework/TestRequest/Response.php | 1 |
5 files changed, 40 insertions, 6 deletions
diff --git a/tests/PHPUnit/Framework/Fixture.php b/tests/PHPUnit/Framework/Fixture.php index 736ffad5fe..c0ea0ce4cd 100644 --- a/tests/PHPUnit/Framework/Fixture.php +++ b/tests/PHPUnit/Framework/Fixture.php @@ -28,6 +28,7 @@ use Piwik\Option; use Piwik\Piwik; use Piwik\Plugin; use Piwik\Plugin\Manager; +use Piwik\Plugins\API\ProcessedReport; use Piwik\Plugins\LanguagesManager\API as APILanguageManager; use Piwik\Plugins\MobileMessaging\MobileMessaging; use Piwik\Plugins\PrivacyManager\DoNotTrackHeaderChecker; @@ -468,11 +469,14 @@ class Fixture extends \PHPUnit_Framework_Assert * @param null|string $searchCategoryParameters * @param null|string $timezone * @param null|string $type eg 'website' or 'mobileapp' + * @param null|string $settings eg 'website' or 'mobileapp' + * @param int $excludeUnknownUrls * @return int idSite of website created */ public static function createWebsite($dateTime, $ecommerce = 0, $siteName = false, $siteUrl = false, $siteSearch = 1, $searchKeywordParameters = null, - $searchCategoryParameters = null, $timezone = null, $type = null) + $searchCategoryParameters = null, $timezone = null, $type = null, + $excludeUnknownUrls = 0) { if($siteName === false) { $siteName = self::DEFAULT_SITE_NAME; @@ -490,7 +494,9 @@ class Fixture extends \PHPUnit_Framework_Assert $startDate = null, $excludedUserAgents = null, $keepURLFragments = null, - $type + $type, + $settings = null, + $excludeUnknownUrls ); // Manually set the website creation date to a day earlier than the earliest day we record stats for diff --git a/tests/PHPUnit/Framework/Mock/Plugin/LogTablesProvider.php b/tests/PHPUnit/Framework/Mock/Plugin/LogTablesProvider.php new file mode 100644 index 0000000000..c563e250cd --- /dev/null +++ b/tests/PHPUnit/Framework/Mock/Plugin/LogTablesProvider.php @@ -0,0 +1,28 @@ +<?php + +namespace Piwik\Tests\Framework\Mock\Plugin; + +use Piwik\Plugins\CoreHome\Tracker\LogTable\Action; +use Piwik\Plugins\CoreHome\Tracker\LogTable\Conversion; +use Piwik\Plugins\CoreHome\Tracker\LogTable\ConversionItem; +use Piwik\Plugins\CoreHome\Tracker\LogTable\LinkVisitAction; +use Piwik\Plugins\CoreHome\Tracker\LogTable\Visit; + +class LogTablesProvider extends \Piwik\Plugin\LogTablesProvider +{ + public function __construct() + { + } + + public function getAllLogTables() + { + return array( + new Visit(), + new Action(), + new LinkVisitAction(), + new ConversionItem(), + new Conversion() + ); + } + +} diff --git a/tests/PHPUnit/Framework/Mock/PiwikPro/Advertising.php b/tests/PHPUnit/Framework/Mock/ProfessionalServices/Advertising.php index b1de8c4899..4be42a6deb 100644 --- a/tests/PHPUnit/Framework/Mock/PiwikPro/Advertising.php +++ b/tests/PHPUnit/Framework/Mock/ProfessionalServices/Advertising.php @@ -5,15 +5,15 @@ * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ -namespace Piwik\Tests\Framework\Mock\PiwikPro; +namespace Piwik\Tests\Framework\Mock\ProfessionalServices; -class Advertising extends \Piwik\PiwikPro\Advertising +class Advertising extends \Piwik\ProfessionalServices\Advertising { public function __construct() { } - public function arePiwikProAdsEnabled() + public function areAdsForProfessionalServicesEnabled() { return true; } diff --git a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php index dbcd3671ef..a2f5f5d7b6 100755 --- a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php +++ b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php @@ -22,7 +22,6 @@ use Piwik\Tests\Framework\Constraint\HttpResponseText; use Piwik\Tests\Framework\TestRequest\ApiTestConfig; use Piwik\Tests\Framework\TestRequest\Collection; use Piwik\Tests\Framework\TestRequest\Response; -use Piwik\Translate; use Piwik\Log; use PHPUnit_Framework_TestCase; use Piwik\Tests\Framework\Fixture; diff --git a/tests/PHPUnit/Framework/TestRequest/Response.php b/tests/PHPUnit/Framework/TestRequest/Response.php index b67b7d8092..cc5b682be2 100644 --- a/tests/PHPUnit/Framework/TestRequest/Response.php +++ b/tests/PHPUnit/Framework/TestRequest/Response.php @@ -131,6 +131,7 @@ class Response 'visitorId', 'nextVisitorId', 'previousVisitorId', + 'idvisitor' ); return $this->removeXmlFields($apiResponse, $toRemove); |