998102816e
Some checks failed
timw4mail/php-kilo/pipeline/head There was a failure building this commit
35 lines
856 B
PHP
35 lines
856 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace Aviat\Kilo\Tests;
|
|
|
|
use Aviat\Kilo\{Terminal\Termios, Terminal\TermiosException};
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class TermiosTest extends TestCase {
|
|
public function testEnableRawMode(): void
|
|
{
|
|
$this->markTestSkipped();
|
|
|
|
// There will be an exception, due to the way the test suite is run
|
|
$this->expectException(TermiosException::class);
|
|
$this->assertNotEquals(NULL, Termios::enableRawMode());
|
|
}
|
|
|
|
/**
|
|
* @depends testEnableRawMode
|
|
*/
|
|
public function testEnableRowModeTwice(): void
|
|
{
|
|
$this->assertNull(Termios::enableRawMode());
|
|
}
|
|
|
|
/**
|
|
* @depends testEnableRawMode
|
|
*/
|
|
public function testDisableRawMode(): void
|
|
{
|
|
// There will be an exception, due to the way the test suite is run
|
|
$this->expectException(TermiosException::class);
|
|
$this->assertFalse(Termios::disableRawMode());
|
|
}
|
|
} |