diff --git a/plugins/PiwikPro/config/test.php b/plugins/PiwikPro/config/test.php new file mode 100644 index 0000000000000000000000000000000000000000..307508f84557fe9d4a14a2bd8a17d8fab22a5211 --- /dev/null +++ b/plugins/PiwikPro/config/test.php @@ -0,0 +1,9 @@ +<?php + +use Piwik\Tests\Framework\Mock\PiwikPro\Advertising; + +return array( + 'Piwik\PiwikPro\Advertising' => function () { + return new Advertising(); + } +); diff --git a/plugins/Widgetize/tests/System/WidgetTest.php b/plugins/Widgetize/tests/System/WidgetTest.php index 4573b708b131628a307d7a0569be36a5c31ca3fb..58c81aa6b193cf7a480b888038fd9514fa304e45 100644 --- a/plugins/Widgetize/tests/System/WidgetTest.php +++ b/plugins/Widgetize/tests/System/WidgetTest.php @@ -13,7 +13,6 @@ use Piwik\Http\ControllerResolver; use Piwik\Piwik; use Piwik\Plugins\Goals; use Piwik\Plugins\Widgetize\tests\Fixtures\WidgetizeFixture; -use Piwik\Tests\Framework\Mock\PiwikPro\Advertising; use Piwik\Tests\Framework\TestCase\SystemTestCase; use Piwik\WidgetsList; @@ -847,19 +846,6 @@ class WidgetTest extends SystemTestCase ) ); } - - /** - * Use this method to return custom container configuration that you want to apply for the tests. - * This configuration will override Fixture config. - * - * @return array - */ - public static function provideContainerConfigBeforeClass() - { - return array( - 'Piwik\PiwikPro\Advertising' => new Advertising() - ); - } } diff --git a/tests/PHPUnit/Framework/Mock/PiwikPro/Advertising.php b/tests/PHPUnit/Framework/Mock/PiwikPro/Advertising.php new file mode 100644 index 0000000000000000000000000000000000000000..b1de8c4899c75f6c635ce9405a25ec6dbb76287b --- /dev/null +++ b/tests/PHPUnit/Framework/Mock/PiwikPro/Advertising.php @@ -0,0 +1,20 @@ +<?php +/** + * Piwik - free/libre analytics platform + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + */ +namespace Piwik\Tests\Framework\Mock\PiwikPro; + +class Advertising extends \Piwik\PiwikPro\Advertising +{ + public function __construct() + { + } + + public function arePiwikProAdsEnabled() + { + return true; + } +} \ No newline at end of file