Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tabuna committed Oct 23, 2024
1 parent cc5a653 commit 7762014
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/Unit/Screen/TDForTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,24 @@ public function testTdClass(): void
{
$class = 'my-custom-class';

$view = TD::make('name')->class($class)->buildTd(new Repository(['name' => 'value']));
$view = TD::make('name')->class($class)
->buildTd(new Repository(['name' => 'value']));

$this->assertStringContainsString('text-start text-truncate '.$class.'', $view);

$this->assertStringContainsString($class, $view);
}

public function testTdWidthWithCustomStyle(): void
{
$width = '100px';
$style = 'border-color: red;';

$view = TD::make('name')->width($width)->style($style)->buildTd(new Repository(['name' => 'value']));
$view = TD::make('name')
->width($width)
->style($style)
->buildTd(new Repository([
'name' => 'value'
]));

$this->assertStringContainsString('style="min-width:'.$width.'; '.$style.'', $view);
}
Expand Down

0 comments on commit 7762014

Please sign in to comment.