Skip to content

Tests: one class per file #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 1 addition & 27 deletions tests/ConsoleColorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,9 @@
namespace PHP_Parallel_Lint\PhpConsoleColor\Test;

use PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor;
use PHP_Parallel_Lint\PhpConsoleColor\Test\Fixtures\ConsoleColorWithForceSupport;
use PHPUnit\Framework\TestCase;

class ConsoleColorWithForceSupport extends ConsoleColor
{
private $isSupportedForce = true;

private $are256ColorsSupportedForce = true;

public function setIsSupported($isSupported)
{
$this->isSupportedForce = $isSupported;
}

public function isSupported()
{
return $this->isSupportedForce;
}

public function setAre256ColorsSupported($are256ColorsSupported)
{
$this->are256ColorsSupportedForce = $are256ColorsSupported;
}

public function are256ColorsSupported()
{
return $this->are256ColorsSupportedForce;
}
}

class ConsoleColorTest extends TestCase
{
/** @var ConsoleColorWithForceSupport */
Expand Down
31 changes: 31 additions & 0 deletions tests/Fixtures/ConsoleColorWithForceSupport.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php
namespace PHP_Parallel_Lint\PhpConsoleColor\Test\Fixtures;

use PHP_Parallel_Lint\PhpConsoleColor\ConsoleColor;

class ConsoleColorWithForceSupport extends ConsoleColor
{
private $isSupportedForce = true;

private $are256ColorsSupportedForce = true;

public function setIsSupported($isSupported)
{
$this->isSupportedForce = $isSupported;
}

public function isSupported()
{
return $this->isSupportedForce;
}

public function setAre256ColorsSupported($are256ColorsSupported)
{
$this->are256ColorsSupportedForce = $are256ColorsSupported;
}

public function are256ColorsSupported()
{
return $this->are256ColorsSupportedForce;
}
}