Rename tests according to the class the class they are testing
This commit is contained in:
		
							parent
							
								
									98b532102d
								
							
						
					
					
						commit
						40efcd2fdd
					
				@ -1,6 +1,6 @@
 | 
				
			|||||||
<?php
 | 
					<?php
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace PhpOffice\PhpSpreadsheetTests;
 | 
					namespace PhpOffice\PhpSpreadsheetTests\Sample;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use PhpOffice\PhpSpreadsheet\Helper\Sample;
 | 
					use PhpOffice\PhpSpreadsheet\Helper\Sample;
 | 
				
			||||||
use PHPUnit_Framework_TestCase;
 | 
					use PHPUnit_Framework_TestCase;
 | 
				
			||||||
@ -5,7 +5,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Reader;
 | 
				
			|||||||
use PhpOffice\PhpSpreadsheet\Reader\Html;
 | 
					use PhpOffice\PhpSpreadsheet\Reader\Html;
 | 
				
			||||||
use PHPUnit_Framework_TestCase;
 | 
					use PHPUnit_Framework_TestCase;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class HTMLTest extends PHPUnit_Framework_TestCase
 | 
					class HtmlTest extends PHPUnit_Framework_TestCase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public function testCsvWithAngleBracket()
 | 
					    public function testCsvWithAngleBracket()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -5,7 +5,7 @@ namespace PhpOffice\PhpSpreadsheetTests\Reader;
 | 
				
			|||||||
use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
 | 
					use PhpOffice\PhpSpreadsheet\Reader\Xlsx;
 | 
				
			||||||
use PHPUnit_Framework_TestCase;
 | 
					use PHPUnit_Framework_TestCase;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class XLSXTest extends PHPUnit_Framework_TestCase
 | 
					class XlsxTest extends PHPUnit_Framework_TestCase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Test load Xlsx file without cell reference.
 | 
					     * Test load Xlsx file without cell reference.
 | 
				
			||||||
@ -1,32 +0,0 @@
 | 
				
			|||||||
<?php
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
namespace PhpOffice\PhpSpreadsheetTests\Style;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
use PhpOffice\PhpSpreadsheet\Shared\StringHelper;
 | 
					 | 
				
			||||||
use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
 | 
					 | 
				
			||||||
use PHPUnit_Framework_TestCase;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
class NumberFormatDateTest extends PHPUnit_Framework_TestCase
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
    public function setUp()
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        StringHelper::setDecimalSeparator('.');
 | 
					 | 
				
			||||||
        StringHelper::setThousandsSeparator(',');
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * @dataProvider providerNumberFormat
 | 
					 | 
				
			||||||
     *
 | 
					 | 
				
			||||||
     * @param mixed $expectedResult
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public function testFormatValueWithMask($expectedResult, ...$args)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        $result = NumberFormat::toFormattedString(...$args);
 | 
					 | 
				
			||||||
        self::assertEquals($expectedResult, $result);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    public function providerNumberFormat()
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        return require 'data/Style/NumberFormatDates.php';
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -29,4 +29,20 @@ class NumberFormatTest extends PHPUnit_Framework_TestCase
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
        return require 'data/Style/NumberFormat.php';
 | 
					        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';
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,7 @@ use PhpOffice\PhpSpreadsheet\Worksheet\ColumnCellIterator;
 | 
				
			|||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
 | 
					use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
 | 
				
			||||||
use PHPUnit_Framework_TestCase;
 | 
					use PHPUnit_Framework_TestCase;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WorksheetColumnTest extends PHPUnit_Framework_TestCase
 | 
					class ColumnTest extends PHPUnit_Framework_TestCase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public $mockWorksheet;
 | 
					    public $mockWorksheet;
 | 
				
			||||||
    public $mockColumn;
 | 
					    public $mockColumn;
 | 
				
			||||||
@ -7,7 +7,7 @@ use PhpOffice\PhpSpreadsheet\Worksheet\RowCellIterator;
 | 
				
			|||||||
use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
 | 
					use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
 | 
				
			||||||
use PHPUnit_Framework_TestCase;
 | 
					use PHPUnit_Framework_TestCase;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class WorksheetRowTest extends PHPUnit_Framework_TestCase
 | 
					class RowTest extends PHPUnit_Framework_TestCase
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    public $mockWorksheet;
 | 
					    public $mockWorksheet;
 | 
				
			||||||
    public $mockRow;
 | 
					    public $mockRow;
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user