Code review changes
This commit is contained in:
1 parent
197fb9987a
commit
11d91e1740
20 files changed
+105
-59
No files matched your search
@@ -18,7 +18,7 @@ class SheetTest extends TestCase
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function setUp(): void
|
||||
public function setUp() : void
|
||||
{
|
||||
$this->sheetManager = new SheetManager(new StringHelper());
|
||||
}
|
||||
|
||||
@@ -28,10 +28,10 @@ class StyleManagerTest extends TestCase
|
||||
$this->assertFalse($style->shouldWrapText());
|
||||
|
||||
$styleManager = $this->getStyleManager();
|
||||
$updatedStyle = $styleManager->applyExtraStylesIfNeeded(new Cell("multi\nlines", $style));
|
||||
$managedStyle = $styleManager->applyExtraStylesIfNeeded(new Cell("multi\nlines", $style));
|
||||
|
||||
$this->assertNotNull($updatedStyle);
|
||||
$this->assertTrue($updatedStyle->shouldWrapText());
|
||||
$this->assertTrue($managedStyle->isUpdated());
|
||||
$this->assertTrue($managedStyle->getStyle()->shouldWrapText());
|
||||
}
|
||||
|
||||
public function testApplyExtraStylesIfNeededShouldReturnNullIfWrapTextNotNeeded() : void
|
||||
@@ -40,9 +40,9 @@ class StyleManagerTest extends TestCase
|
||||
$this->assertFalse($style->shouldWrapText());
|
||||
|
||||
$styleManager = $this->getStyleManager();
|
||||
$updatedStyle = $styleManager->applyExtraStylesIfNeeded(new Cell('oneline', $style));
|
||||
$managedStyle = $styleManager->applyExtraStylesIfNeeded(new Cell('oneline', $style));
|
||||
|
||||
$this->assertNull($updatedStyle);
|
||||
$this->assertFalse($managedStyle->isUpdated());
|
||||
}
|
||||
|
||||
public function testApplyExtraStylesIfNeededShouldReturnNullIfWrapTextAlreadyApplied() : void
|
||||
@@ -51,8 +51,8 @@ class StyleManagerTest extends TestCase
|
||||
$this->assertTrue($style->shouldWrapText());
|
||||
|
||||
$styleManager = $this->getStyleManager();
|
||||
$updatedStyle = $styleManager->applyExtraStylesIfNeeded(new Cell("multi\nlines", $style));
|
||||
$managedStyle = $styleManager->applyExtraStylesIfNeeded(new Cell("multi\nlines", $style));
|
||||
|
||||
$this->assertNull($updatedStyle);
|
||||
$this->assertFalse($managedStyle->isUpdated());
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ class StyleMergerTest extends TestCase
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function setUp(): void
|
||||
public function setUp() : void
|
||||
{
|
||||
$this->styleMerger = new StyleMerger();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ class StyleRegistryTest extends TestCase
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function setUp(): void
|
||||
public function setUp() : void
|
||||
{
|
||||
$this->defaultStyle = (new StyleBuilder())->build();
|
||||
$this->styleRegistry = new StyleRegistry($this->defaultStyle);
|
||||
|
||||
Reference in new issue
Block a user