Skip to content

Commit

Permalink
adding @group tag
Browse files Browse the repository at this point in the history
  • Loading branch information
mattab committed Dec 10, 2014
1 parent 4addd85 commit 76e5d92
Show file tree
Hide file tree
Showing 17 changed files with 138 additions and 282 deletions.
3 changes: 3 additions & 0 deletions tests/PHPUnit/Unit/DataTable/Filter/AddSummaryRowTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Piwik\DataTable;
use Piwik\DataTable\Row;

/**
* @group DataTableTest
*/
class DataTable_Filter_AddSummaryRowTest extends \PHPUnit_Framework_TestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
use Piwik\DataTable;
use Piwik\DataTable\Row;

/**
* @group DataTableTest
*/
class DataTable_Filter_ExcludeLowPopulationTest extends \PHPUnit_Framework_TestCase
{
protected function getTestDataTable()
Expand Down
43 changes: 13 additions & 30 deletions tests/PHPUnit/Unit/DataTable/Filter/LimitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
use Piwik\DataTable;
use Piwik\DataTable\Row;

/**
* @group DataTableTest
*/
class DataTable_Filter_LimitTest extends \PHPUnit_Framework_TestCase
{
/**
Expand Down Expand Up @@ -39,9 +42,7 @@ protected function getDataTableCount10()
return $table;
}

/**
* @group Core
*/

public function testNormal()
{
$offset = 2;
Expand All @@ -55,9 +56,7 @@ public function testNormal()
$this->assertEquals(10, $table->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME));
}

/**
* @group Core
*/

public function testLimitLessThanCountShouldReturnCountLimit()
{
$offset = 2;
Expand All @@ -71,9 +70,7 @@ public function testLimitLessThanCountShouldReturnCountLimit()
$this->assertEquals(10, $table->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME));
}

/**
* @group Core
*/

public function testLimitIsCountShouldNotDeleteAnything()
{
$offset = 0;
Expand All @@ -88,9 +85,7 @@ public function testLimitIsCountShouldNotDeleteAnything()
$this->assertEquals(10, $table->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME));
}

/**
* @group Core
*/

public function testLimitGreaterThanCountShouldReturnCountUntilCount()
{
$offset = 5;
Expand All @@ -105,9 +100,7 @@ public function testLimitGreaterThanCountShouldReturnCountUntilCount()
$this->assertEquals(10, $table->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME));
}

/**
* @group Core
*/

public function testLimitIsNullShouldReturnCountIsOffset()
{
$offset = 1;
Expand All @@ -120,9 +113,7 @@ public function testLimitIsNullShouldReturnCountIsOffset()
$this->assertEquals(10, $table->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME));
}

/**
* @group Core
*/

public function testOffsetJustBeforeSummaryRowShouldJustReturnSummaryRow()
{
$offset = 9;
Expand All @@ -136,9 +127,7 @@ public function testOffsetJustBeforeSummaryRowShouldJustReturnSummaryRow()
$this->assertEquals(10, $table->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME));
}

/**
* @group Core
*/

public function testOffsetJustBeforeSummaryRowWithBigLimitShouldJustReturnSummaryRow()
{
$offset = 9;
Expand All @@ -152,9 +141,7 @@ public function testOffsetJustBeforeSummaryRowWithBigLimitShouldJustReturnSummar
$this->assertEquals(10, $table->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME));
}

/**
* @group Core
*/

public function testOffsetBeforeSummaryRowShouldJustReturnRowAndSummaryRow()
{
$offset = 8;
Expand All @@ -168,9 +155,7 @@ public function testOffsetBeforeSummaryRowShouldJustReturnRowAndSummaryRow()
$this->assertEquals(10, $table->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME));
}

/**
* @group Core
*/

public function testOffsetGreaterThanCountShouldReturnEmptyTable()
{
$offset = 10;
Expand All @@ -182,9 +167,7 @@ public function testOffsetGreaterThanCountShouldReturnEmptyTable()
$this->assertEquals(10, $table->getMetadata(DataTable::TOTAL_ROWS_BEFORE_LIMIT_METADATA_NAME));
}

/**
* @group Core
*/

public function testLimitIsZeroShouldReturnEmptyTable()
{
$offset = 0;
Expand Down
3 changes: 3 additions & 0 deletions tests/PHPUnit/Unit/DataTable/Filter/PatternRecursiveTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Piwik\DataTable;
use Piwik\DataTable\Row;

/**
* @group DataTableTest
*/
class DataTable_Filter_PatternRecursiveTest extends \PHPUnit_Framework_TestCase
{
/**
Expand Down
3 changes: 3 additions & 0 deletions tests/PHPUnit/Unit/DataTable/Filter/PatternTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
use Piwik\DataTable;
use Piwik\DataTable\Row;

/**
* @group DataTableTest
*/
class DataTable_Filter_PatternTest extends \PHPUnit_Framework_TestCase
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Exception;

/**
* @group Core
* @group DataTableTest
*/
class PivotByDimensionTest extends PHPUnit_Framework_TestCase
{
Expand Down
11 changes: 5 additions & 6 deletions tests/PHPUnit/Unit/DataTable/Filter/RangeCheckTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
use Piwik\DataTable;
use Piwik\DataTable\Row;

/**
* @group DataTableTest
*/
class DataTable_Filter_RangeCheckTest extends \PHPUnit_Framework_TestCase
{
/**
* @group Core
*/

public function testRangeCheckNormalDataTable()
{
$table = new DataTable();
Expand All @@ -34,9 +35,7 @@ public function testRangeCheckNormalDataTable()
$this->assertEquals($expectedOrder, $table->getColumn('count'));
}

/**
* @group Core
*/

public function testRangeCheckNormalDataTableNonIntegerValues()
{
$table = new DataTable();
Expand Down
18 changes: 5 additions & 13 deletions tests/PHPUnit/Unit/DataTable/Filter/SortTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@
use Piwik\DataTable\Row;

/**
* @group SortTest
* @group DataTableTest
*/
class DataTable_Filter_SortTest extends \PHPUnit_Framework_TestCase
{
/**
* @group Core
*/

public function testNormalSortDescending()
{
$table = new DataTable();
Expand All @@ -34,9 +32,7 @@ public function testNormalSortDescending()
$this->assertEquals($expectedOrder, $table->getColumn('label'));
}

/**
* @group Core
*/

public function testNormalSortAscending()
{
$table = new DataTable();
Expand All @@ -51,9 +47,7 @@ public function testNormalSortAscending()
$this->assertEquals($expectedOrder, $table->getColumn('label'));
}

/**
* @group Core
*/

public function testMissingColumnValuesShouldAppearLastAfterSortAsc()
{
$table = new DataTable();
Expand All @@ -71,9 +65,7 @@ public function testMissingColumnValuesShouldAppearLastAfterSortAsc()
$this->assertEquals($expectedOrder, $table->getColumn('label'));
}

/**
* @group Core
*/

public function testMissingColumnValuesShouldAppearLastAfterSortDesc()
{
$table = new DataTable();
Expand Down
39 changes: 12 additions & 27 deletions tests/PHPUnit/Unit/DataTable/Filter/TruncateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
use Piwik\DataTable;
use Piwik\DataTable\Row;

/**
* @group DataTableTest
*/
class DataTable_Filter_TruncateTest extends \PHPUnit_Framework_TestCase
{
/**
* @group Core
*/

public function testUnrelatedDataTableNotFiltered()
{
// remark: this unit test would become invalid and would need to be rewritten if
Expand All @@ -38,9 +39,7 @@ public function testUnrelatedDataTableNotFiltered()
$filter->filter($dataTableBeingFiltered);
}

/**
* @group Core
*/

public function testForInfiniteRecursion()
{
$dataTableBeingFiltered = new DataTable();
Expand All @@ -62,9 +61,7 @@ public function testForInfiniteRecursion()
$filter->filter($dataTableBeingFiltered);
}

/**
* @group Core
*/

public function testOffsetIsCountSummaryRowShouldBeTheRow()
{
$table = $this->getDataTableCount5();
Expand All @@ -74,9 +71,7 @@ public function testOffsetIsCountSummaryRowShouldBeTheRow()
$this->assertTrue(Row::isEqual($table->getLastRow(), $this->getRow4()));
}

/**
* @group Core
*/

public function testOffsetIsLessThanCountSummaryRowShouldBeTheSum()
{
$table = $this->getDataTableCount5();
Expand All @@ -89,9 +84,7 @@ public function testOffsetIsLessThanCountSummaryRowShouldBeTheSum()
$this->assertEquals(array_keys($table->getLastRow()->getColumns()), array_keys($expectedRow->getColumns()));
}

/**
* @group Core
*/

public function testOffsetIsMoreThanCountShouldNotTruncate()
{
$table = $this->getDataTableCount5();
Expand All @@ -101,9 +94,7 @@ public function testOffsetIsMoreThanCountShouldNotTruncate()
$this->assertTrue(Row::isEqual($table->getLastRow(), $this->getRow4()));
}

/**
* @group Core
*/

public function testWhenThereIsAlreadyASummaryRowShouldReplaceTheSummaryRow()
{
$table = $this->getDataTableCount5();
Expand All @@ -116,9 +107,7 @@ public function testWhenThereIsAlreadyASummaryRowShouldReplaceTheSummaryRow()
$this->assertTrue(Row::isEqual($table->getLastRow(), $expectedRow));
}

/**
* @group Core
*/

public function testSumTablesWithSummaryRowShouldSumTheSummaryRow()
{
// row0, row1, row2, rowSummary1
Expand All @@ -142,9 +131,7 @@ public function testSumTablesWithSummaryRowShouldSumTheSummaryRow()
$this->assertTrue(DataTable::isEqual($expectedTable, $table1));
}

/**
* @group Core
*/

public function testAddOneTableWithSummaryRow()
{
// row0, row1, row2, rowSummary1
Expand All @@ -169,9 +156,7 @@ public function testAddOneTableWithSummaryRow()

}

/**
* @group Core
*/

public function testWhenRowsInRandomOrderButSortSpecifiedShouldComputeSummaryRowAfterSort()
{
$table = new DataTable;
Expand Down
3 changes: 3 additions & 0 deletions tests/PHPUnit/Unit/DataTable/MapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use Piwik\DataTable;
use Piwik\DataTable\Row;

/**
* @group DataTableTest
*/
class Test_DataTable_Map extends \PHPUnit_Framework_TestCase
{
public function setUp()
Expand Down
Loading

0 comments on commit 76e5d92

Please sign in to comment.