Skip to content

Commit 93de49e

Browse files
committed
ProgressBarTest : adding () in the new statement for php < 8.4 #25
1 parent bcbf883 commit 93de49e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/ProgressBar/ProgressBarTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function testStartWithTitleDifferentColor(): void
9797
public function testTitleWithSinglePercentageSign(): void
9898
{
9999
// Test with a single percentage sign
100-
new ProgressBar(5)->setTitle('Progress: 50%', Foreground::GREEN)->start();
100+
(new ProgressBar(5))->setTitle('Progress: 50%', Foreground::GREEN)->start();
101101

102102
$this->assertStringStartsWith(
103103
"\n\n\e[1A\e[1000D\33[2K" . Style::stylize("\tProgress: 50%", fg: Foreground::GREEN)
@@ -111,7 +111,7 @@ public function testTitleWithSinglePercentageSign(): void
111111
public function testTitleWithDoublePercentageSign(): void
112112
{
113113
// Test with a double percentage sign
114-
new ProgressBar(5)->setTitle('Progress: 100%%')->start();
114+
(new ProgressBar(5))->setTitle('Progress: 100%%')->start();
115115

116116
$this->assertStringStartsWith(
117117
"\n\n\e[1A\e[1000D\33[2K" . Style::stylize("\tProgress: 100%%", fg: Foreground::BLUE)
@@ -125,7 +125,7 @@ public function testTitleWithDoublePercentageSign(): void
125125
public function testTitleWithMultiplePercentageSigns(): void
126126
{
127127
// Test with multiple percentage signs
128-
new ProgressBar(5)->setTitle('Progress: 25% and 75%')->start();
128+
(new ProgressBar(5))->setTitle('Progress: 25% and 75%')->start();
129129

130130
$this->assertStringStartsWith(
131131
"\n\n\e[1A\e[1000D\33[2K" . Style::stylize("\tProgress: 25% and 75%", fg: Foreground::BLUE)

0 commit comments

Comments
 (0)