minor fixes to unit tests (#72)

This commit is contained in:
Henrik Gemal 2017-01-13 04:06:00 +01:00 committed by Adrien Crivelli
parent 2aa7707826
commit 5a8acce94c
2 changed files with 7 additions and 7 deletions

View File

@ -127,7 +127,7 @@ class ColumnTest extends \PHPUnit_Framework_TestCase
$result = $this->testAutoFilterColumnObject->getAttributes();
$this->assertInternalType('array', $result);
$this->assertEquals(count($attributeSet), count($result));
$this->assertCount(count($attributeSet), $result);
}
public function testSetAttribute()

View File

@ -106,7 +106,7 @@ class AutoFilterTest extends \PHPUnit_Framework_TestCase
// There should be no columns yet defined
$result = $this->testAutoFilterObject->getColumns();
$this->assertInternalType('array', $result);
$this->assertEquals(0, count($result));
$this->assertCount(0, $result);
}
public function testGetColumnOffset()
@ -147,7 +147,7 @@ class AutoFilterTest extends \PHPUnit_Framework_TestCase
// Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column
// objects for each column we set indexed by the column ID
$this->assertInternalType('array', $result);
$this->assertEquals(1, count($result));
$this->assertCount(1, $result);
$this->assertArrayHasKey($expectedResult, $result);
$this->assertInstanceOf(Column::class, $result[$expectedResult]);
}
@ -175,7 +175,7 @@ class AutoFilterTest extends \PHPUnit_Framework_TestCase
// Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column
// objects for each column we set indexed by the column ID
$this->assertInternalType('array', $result);
$this->assertEquals(1, count($result));
$this->assertCount(1, $result);
$this->assertArrayHasKey($expectedResult, $result);
$this->assertInstanceOf(Column::class, $result[$expectedResult]);
}
@ -214,7 +214,7 @@ class AutoFilterTest extends \PHPUnit_Framework_TestCase
// Result should be an array of \PhpOffice\PhpSpreadsheet\Worksheet\AutoFilter\Column
// objects for each column we set indexed by the column ID
$this->assertInternalType('array', $result);
$this->assertEquals(count($columnIndexes), count($result));
$this->assertCount(count($columnIndexes), $result);
foreach ($columnIndexes as $columnIndex) {
$this->assertArrayHasKey($columnIndex, $result);
$this->assertInstanceOf(Column::class, $result[$columnIndex]);
@ -292,7 +292,7 @@ class AutoFilterTest extends \PHPUnit_Framework_TestCase
// Column array should be cleared
$result = $this->testAutoFilterObject->getColumns();
$this->assertInternalType('array', $result);
$this->assertEquals(0, count($result));
$this->assertCount(0, $result);
}
public function testSetRangeWithExistingColumns()
@ -322,7 +322,7 @@ class AutoFilterTest extends \PHPUnit_Framework_TestCase
// still fall within the new range should be retained
$result = $this->testAutoFilterObject->getColumns();
$this->assertInternalType('array', $result);
$this->assertEquals(count($columnIndexes1), count($result));
$this->assertCount(count($columnIndexes1), $result);
}
public function testClone()