Skip to content

Commit

Permalink
minor twigphp#1571 removed @Covers annotations (fabpot)
Browse files Browse the repository at this point in the history
This PR was merged into the 1.16-dev branch.

Discussion
----------

removed @Covers annotations

I propose to remove the `@covers` annotations for the following main reasons:

 * they were only used in a limited number of test cases;
 * they limited the code coverage of nodes for no reasons (some other tests are as valid to test the nodes).

Commits
-------

4ba0789 removed @Covers annotations
  • Loading branch information
fabpot committed Nov 20, 2014
2 parents b87cf88 + 4ba0789 commit efed4fa
Show file tree
Hide file tree
Showing 39 changed files with 0 additions and 489 deletions.
12 changes: 0 additions & 12 deletions test/Twig/Tests/Node/AutoEscapeTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_AutoEscapeTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_AutoEscape::__construct
*/
public function testConstructor()
{
$body = new Twig_Node(array(new Twig_Node_Text('foo', 1)));
Expand All @@ -23,15 +20,6 @@ public function testConstructor()
$this->assertTrue($node->getAttribute('value'));
}

/**
* @covers Twig_Node_AutoEscape::compile
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$body = new Twig_Node(array(new Twig_Node_Text('foo', 1)));
Expand Down
12 changes: 0 additions & 12 deletions test/Twig/Tests/Node/BlockReferenceTest.php
Expand Up @@ -11,25 +11,13 @@

class Twig_Tests_Node_BlockReferenceTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_BlockReference::__construct
*/
public function testConstructor()
{
$node = new Twig_Node_BlockReference('foo', 1);

$this->assertEquals('foo', $node->getAttribute('name'));
}

/**
* @covers Twig_Node_BlockReference::compile
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
return array(
Expand Down
12 changes: 0 additions & 12 deletions test/Twig/Tests/Node/BlockTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_BlockTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Block::__construct
*/
public function testConstructor()
{
$body = new Twig_Node_Text('foo', 1);
Expand All @@ -23,15 +20,6 @@ public function testConstructor()
$this->assertEquals('foo', $node->getAttribute('name'));
}

/**
* @covers Twig_Node_Block::compile
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$body = new Twig_Node_Text('foo', 1);
Expand Down
12 changes: 0 additions & 12 deletions test/Twig/Tests/Node/DoTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_DoTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Do::__construct
*/
public function testConstructor()
{
$expr = new Twig_Node_Expression_Constant('foo', 1);
Expand All @@ -22,15 +19,6 @@ public function testConstructor()
$this->assertEquals($expr, $node->getNode('expr'));
}

/**
* @covers Twig_Node_Do::compile
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$tests = array();
Expand Down
12 changes: 0 additions & 12 deletions test/Twig/Tests/Node/Expression/ArrayTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_ArrayTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Array::__construct
*/
public function testConstructor()
{
$elements = array(new Twig_Node_Expression_Constant('foo', 1), $foo = new Twig_Node_Expression_Constant('bar', 1));
Expand All @@ -22,15 +19,6 @@ public function testConstructor()
$this->assertEquals($foo, $node->getNode(1));
}

/**
* @covers Twig_Node_Expression_Array::compile
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$elements = array(
Expand Down
12 changes: 0 additions & 12 deletions test/Twig/Tests/Node/Expression/AssignNameTest.php
Expand Up @@ -11,25 +11,13 @@

class Twig_Tests_Node_Expression_AssignNameTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_AssignName::__construct
*/
public function testConstructor()
{
$node = new Twig_Node_Expression_AssignName('foo', 1);

$this->assertEquals('foo', $node->getAttribute('name'));
}

/**
* @covers Twig_Node_Expression_AssignName::compile
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$node = new Twig_Node_Expression_AssignName('foo', 1);
Expand Down
13 changes: 0 additions & 13 deletions test/Twig/Tests/Node/Expression/Binary/AddTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_Binary_AddTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Binary_Add::__construct
*/
public function testConstructor()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand All @@ -24,16 +21,6 @@ public function testConstructor()
$this->assertEquals($right, $node->getNode('right'));
}

/**
* @covers Twig_Node_Expression_Binary_Add::compile
* @covers Twig_Node_Expression_Binary_Add::operator
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand Down
13 changes: 0 additions & 13 deletions test/Twig/Tests/Node/Expression/Binary/AndTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_Binary_AndTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Binary_And::__construct
*/
public function testConstructor()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand All @@ -24,16 +21,6 @@ public function testConstructor()
$this->assertEquals($right, $node->getNode('right'));
}

/**
* @covers Twig_Node_Expression_Binary_And::compile
* @covers Twig_Node_Expression_Binary_And::operator
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand Down
13 changes: 0 additions & 13 deletions test/Twig/Tests/Node/Expression/Binary/ConcatTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_Binary_ConcatTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Binary_Concat::__construct
*/
public function testConstructor()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand All @@ -24,16 +21,6 @@ public function testConstructor()
$this->assertEquals($right, $node->getNode('right'));
}

/**
* @covers Twig_Node_Expression_Binary_Concat::compile
* @covers Twig_Node_Expression_Binary_Concat::operator
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand Down
13 changes: 0 additions & 13 deletions test/Twig/Tests/Node/Expression/Binary/DivTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_Binary_DivTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Binary_Div::__construct
*/
public function testConstructor()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand All @@ -24,16 +21,6 @@ public function testConstructor()
$this->assertEquals($right, $node->getNode('right'));
}

/**
* @covers Twig_Node_Expression_Binary_Div::compile
* @covers Twig_Node_Expression_Binary_Div::operator
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand Down
13 changes: 0 additions & 13 deletions test/Twig/Tests/Node/Expression/Binary/FloorDivTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_Binary_FloorDivTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Binary_FloorDiv::__construct
*/
public function testConstructor()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand All @@ -24,16 +21,6 @@ public function testConstructor()
$this->assertEquals($right, $node->getNode('right'));
}

/**
* @covers Twig_Node_Expression_Binary_FloorDiv::compile
* @covers Twig_Node_Expression_Binary_FloorDiv::operator
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand Down
13 changes: 0 additions & 13 deletions test/Twig/Tests/Node/Expression/Binary/ModTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_Binary_ModTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Binary_Mod::__construct
*/
public function testConstructor()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand All @@ -24,16 +21,6 @@ public function testConstructor()
$this->assertEquals($right, $node->getNode('right'));
}

/**
* @covers Twig_Node_Expression_Binary_Mod::compile
* @covers Twig_Node_Expression_Binary_Mod::operator
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand Down
13 changes: 0 additions & 13 deletions test/Twig/Tests/Node/Expression/Binary/MulTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_Binary_MulTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Binary_Mul::__construct
*/
public function testConstructor()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand All @@ -24,16 +21,6 @@ public function testConstructor()
$this->assertEquals($right, $node->getNode('right'));
}

/**
* @covers Twig_Node_Expression_Binary_Mul::compile
* @covers Twig_Node_Expression_Binary_Mul::operator
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand Down
13 changes: 0 additions & 13 deletions test/Twig/Tests/Node/Expression/Binary/OrTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_Binary_OrTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Binary_Or::__construct
*/
public function testConstructor()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand All @@ -24,16 +21,6 @@ public function testConstructor()
$this->assertEquals($right, $node->getNode('right'));
}

/**
* @covers Twig_Node_Expression_Binary_Or::compile
* @covers Twig_Node_Expression_Binary_Or::operator
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand Down
13 changes: 0 additions & 13 deletions test/Twig/Tests/Node/Expression/Binary/SubTest.php
Expand Up @@ -11,9 +11,6 @@

class Twig_Tests_Node_Expression_Binary_SubTest extends Twig_Test_NodeTestCase
{
/**
* @covers Twig_Node_Expression_Binary_Sub::__construct
*/
public function testConstructor()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand All @@ -24,16 +21,6 @@ public function testConstructor()
$this->assertEquals($right, $node->getNode('right'));
}

/**
* @covers Twig_Node_Expression_Binary_Sub::compile
* @covers Twig_Node_Expression_Binary_Sub::operator
* @dataProvider getTests
*/
public function testCompile($node, $source, $environment = null)
{
parent::testCompile($node, $source, $environment);
}

public function getTests()
{
$left = new Twig_Node_Expression_Constant(1, 1);
Expand Down

0 comments on commit efed4fa

Please sign in to comment.