Skip to content
Extraits de code Groupes Projets
Valider 8a15d3a0 rédigé par Matthieu Napoli's avatar Matthieu Napoli
Parcourir les fichiers

Fix unit tests by removing deprecated classes

parent c7a4ff40
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
/**
* Base class for benchmarks.
*
* @deprecated since 2.10.0 use Piwik\Tests\Framework\TestCase\BenchmarkTestCase instead
*/
abstract class BenchmarkTestCase extends \Piwik\Tests\Framework\TestCase\BenchmarkTestCase
{
}
<?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;
/**
* @deprecated since 2.10.0 use \Piwik\Tests\Framework\TestCase\ConsoleCommandTestCase instead
*/
class ConsoleCommandTestCase extends Framework\TestCase\ConsoleCommandTestCase
{
}
\ No newline at end of file
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
/**
* @deprecated since 2.8.0 use \Piwik\Tests\Framework\TestCase\IntegrationTestCase instead
*/
class DatabaseTestCase extends \Piwik\Tests\Framework\TestCase\IntegrationTestCase
{
public static function setUpBeforeClass()
{
\Piwik\Log::debug('\DatabaseTestCase is deprecated since 2.8.0 extend \Piwik\Tests\Framework\TestCase\IntegrationTestCase instead');
parent::setUpBeforeClass();
}
}
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
use \Piwik\Tests\Framework\Mock\FakeAccess as MockFakeAccess;
/**
* FakeAccess for UnitTests
*
* @deprecated since 2.10.0 use \Piwik\Tests\Framework\Mock\FakeAccess instead
*/
class FakeAccess extends MockFakeAccess
{
}
\ No newline at end of file
<?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;
use Piwik\Log;
/**
* @deprecated since 2.8.0 use \Piwik\Tests\Framework\Fixture instead
*/
class Fixture extends Framework\Fixture
{
/** Adds data to Piwik. Creates sites, tracks visits, imports log files, etc. */
public function setUp()
{
Log::warning('Piwik\Tests\Fixture is deprecated, use \Piwik\Tests\Framework\Fixture instead');
parent::setUp();
}
}
/**
* @deprecated since 2.8.0 use \Piwik\Tests\Framework\OverrideLogin instead
*/
class OverrideLogin extends Framework\OverrideLogin
{
}
\ No newline at end of file
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
/**
* @deprecated since 2.8.0 extend \Piwik\Tests\Framework\TestCase\SystemTestCase instead
*/
class IntegrationTestCase extends \Piwik\Tests\Framework\TestCase\SystemTestCase
{
public static function setUpBeforeClass()
{
\Piwik\Log::debug('\IntegrationTestCase is deprecated since 2.8.0 extend \Piwik\Tests\Framework\TestCase\SystemTestCase instead');
parent::setUpBeforeClass();
}
}
IntegrationTestCase::$fixture = new \Piwik\Tests\Framework\Fixture();
......@@ -20,7 +20,7 @@ use ReflectionClass;
*/
class DeprecatedMethodsTest extends \PHPUnit_Framework_TestCase
{
public function test_version2_0_4()
public function test_deprecations()
{
$validTill = '2015-02-25';
$this->assertDeprecatedMethodIsRemoved('\Piwik\Period', 'factory', $validTill);
......
......@@ -34,10 +34,7 @@ if (!defined('PIWIK_INCLUDE_SEARCH_PATH')) {
require_once PIWIK_INCLUDE_PATH . '/core/bootstrap.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/DatabaseTestCase.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/IntegrationTestCase.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/BenchmarkTestCase.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/FakeAccess.php';
require_once PIWIK_INCLUDE_PATH . '/libs/PiwikTracker/PiwikTracker.php';
require_once PIWIK_INCLUDE_PATH . '/tests/PHPUnit/TestingEnvironment.php';
if (getenv('PIWIK_USE_XHPROF') == 1) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter