Skip to content

Commit

Permalink
Mark transformers as deprecated.
Browse files Browse the repository at this point in the history
They will be removed in 4.0
  • Loading branch information
markstory committed Nov 16, 2017
1 parent 45c032a commit ceb4614
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/TestCase/Http/RequestTransformerTest.php
Expand Up @@ -23,9 +23,41 @@

/**
* Test for RequestTransformer
*
* @group deprecated
*/
class RequestTransformerTest extends TestCase
{
/**
* Old error level
*
* @var int
*/
protected $errorLevel;

/**
* setup
*
* @return void
*/
public function setUp()
{
parent::setUp();
$this->errorLevel = error_reporting(E_ALL ^ E_USER_DEPRECATED);
}

/**
* teardown
*
* @return void
*/
public function tearDown()
{
parent::tearDown();
error_reporting($this->errorLevel);
unset($this->errorLevel);
}

/**
* Test transforming GET params.
*
Expand Down
12 changes: 12 additions & 0 deletions tests/TestCase/Http/ResponseTransformerTest.php
Expand Up @@ -22,6 +22,8 @@

/**
* Test case for the response transformer.
*
* @group deprecated
*/
class ResponseTransformerTest extends TestCase
{
Expand All @@ -32,6 +34,13 @@ class ResponseTransformerTest extends TestCase
*/
protected $server;

/**
* Old error level
*
* @var int
*/
protected $errorLevel;

/**
* setup
*
Expand All @@ -41,6 +50,7 @@ public function setUp()
{
parent::setUp();
$this->server = $_SERVER;
$this->errorLevel = error_reporting(E_ALL ^ E_USER_DEPRECATED);
}

/**
Expand All @@ -52,6 +62,8 @@ public function tearDown()
{
parent::tearDown();
$_SERVER = $this->server;
error_reporting($this->errorLevel);
unset($this->errorLevel);
}

/**
Expand Down

0 comments on commit ceb4614

Please sign in to comment.