Skip to content

Commit

Permalink
Rename tests according to the class the class they are testing
Browse files Browse the repository at this point in the history
  • Loading branch information
PowerKiKi authored and Frederic Delaunay committed Oct 29, 2018
1 parent 6f30555 commit 85096dd
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace PhpOffice\PhpSpreadsheetTests;
namespace PhpOffice\PhpSpreadsheetTests\Sample;

use PhpOffice\PhpSpreadsheet\Helper\Sample;
use PHPUnit_Framework_TestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PhpOffice\PhpSpreadsheet\Reader\Html;
use PHPUnit_Framework_TestCase;

class HTMLTest extends PHPUnit_Framework_TestCase
class HtmlTest extends PHPUnit_Framework_TestCase
{
public function testCsvWithAngleBracket()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
use PHPUnit_Framework_TestCase;

class XLSXTest extends PHPUnit_Framework_TestCase
class XlsxTest extends PHPUnit_Framework_TestCase
{
/**
* Test load Xlsx file without cell reference.
Expand Down
32 changes: 0 additions & 32 deletions tests/PhpSpreadsheetTests/Style/NumberFormatDateTest.php

This file was deleted.

16 changes: 16 additions & 0 deletions tests/PhpSpreadsheetTests/Style/NumberFormatTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,20 @@ public function providerNumberFormat()
{
return require 'data/Style/NumberFormat.php';
}

/**
* @dataProvider providerNumberFormatDates
*
* @param mixed $expectedResult
*/
public function testFormatValueWithMaskDate($expectedResult, ...$args)
{
$result = NumberFormat::toFormattedString(...$args);
self::assertEquals($expectedResult, $result);
}

public function providerNumberFormatDates()
{
return require 'data/Style/NumberFormatDates.php';
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use PHPUnit_Framework_TestCase;

class WorksheetColumnTest extends PHPUnit_Framework_TestCase
class ColumnTest extends PHPUnit_Framework_TestCase
{
public $mockWorksheet;
public $mockColumn;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
use PHPUnit_Framework_TestCase;

class WorksheetRowTest extends PHPUnit_Framework_TestCase
class RowTest extends PHPUnit_Framework_TestCase
{
public $mockWorksheet;
public $mockRow;
Expand Down

0 comments on commit 85096dd

Please sign in to comment.