Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[3.0] use ContainerAwareTrait #16411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 5, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[VarDumper] replace VarDumperTestCase by trait
  • Loading branch information
Tobion committed Nov 4, 2015
commit 230990188db46ee00a514db0049d279d8012b8f0
46 changes: 0 additions & 46 deletions 46 src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php

This file was deleted.

6 changes: 4 additions & 2 deletions 6 src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
namespace Symfony\Component\VarDumper\Tests\Caster;

use Symfony\Component\VarDumper\Caster\Caster;
use Symfony\Component\VarDumper\Test\VarDumperTestCase;
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;

/**
* @author Nicolas Grekas <p@tchwork.com>
*/
class CasterTest extends VarDumperTestCase
class CasterTest extends \PHPUnit_Framework_TestCase
{
use VarDumperTestTrait;

private $referenceArray = array(
'null' => null,
'empty' => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@

namespace Symfony\Component\VarDumper\Tests\Caster;

use Symfony\Component\VarDumper\Test\VarDumperTestCase;
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;
use Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo;

/**
* @author Nicolas Grekas <p@tchwork.com>
*/
class ReflectionCasterTest extends VarDumperTestCase
class ReflectionCasterTest extends \PHPUnit_Framework_TestCase
{
use VarDumperTestTrait;

public function testReflectionCaster()
{
$var = new \ReflectionClass('ReflectionClass');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@

namespace Symfony\Component\VarDumper\Tests\Caster;

use Symfony\Component\VarDumper\Test\VarDumperTestCase;
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;

/**
* @author Grégoire Pineau <lyrixx@lyrixx.info>
*/
class SplCasterTest extends VarDumperTestCase
class SplCasterTest extends \PHPUnit_Framework_TestCase
{
use VarDumperTestTrait;

public function getCastFileInfoTests()
{
return array(
Expand Down
6 changes: 4 additions & 2 deletions 6 src/Symfony/Component/VarDumper/Tests/CliDumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@

use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDumper\Dumper\CliDumper;
use Symfony\Component\VarDumper\Test\VarDumperTestCase;
use Symfony\Component\VarDumper\Test\VarDumperTestTrait;

/**
* @author Nicolas Grekas <p@tchwork.com>
*/
class CliDumperTest extends VarDumperTestCase
class CliDumperTest extends \PHPUnit_Framework_TestCase
{
use VarDumperTestTrait;

public function testGet()
{
require __DIR__.'/Fixtures/dumb-var.php';
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,32 @@
* file that was distributed with this source code.
*/

// Skipping trait tests for PHP < 5.4
if (version_compare(PHP_VERSION, '5.4.0-dev', '>=')) {
require 'VarDumpTestTraitRequire54.php';
}
namespace Symfony\Component\VarDumper\Tests\Test;

use Symfony\Component\VarDumper\Test\VarDumperTestTrait;

class VarDumperTestTraitTest extends \PHPUnit_Framework_TestCase
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a mistake that was here before but could be fixed here: the name of the file is wrong (VarDumper)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

{
use VarDumperTestTrait;

public function testItComparesLargeData()
{
$howMany = 700;
$data = array_fill_keys(range(0, $howMany), array('a', 'b', 'c', 'd'));

$expected = sprintf("array:%d [\n", $howMany + 1);
for ($i = 0; $i <= $howMany; ++$i) {
$expected .= <<<EODUMP
$i => array:4 [
0 => "a"
1 => "b"
2 => "c"
3 => "d"
]\n
EODUMP;
}
$expected .= "]\n";

$this->assertDumpEquals($expected, $data);
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.