mirror of
https://github.com/lkeme/BiliHelper-personal.git
synced 2025-12-19 01:20:08 +08:00
51 lines
887 B
PHP
51 lines
887 B
PHP
<?php
|
|
|
|
use Flintstone\Line;
|
|
|
|
class LineTest extends \PHPUnit\Framework\TestCase
|
|
{
|
|
/**
|
|
* @var Line
|
|
*/
|
|
private $line;
|
|
|
|
protected function setUp(): void
|
|
{
|
|
$this->line = new Line('foo=bar');
|
|
}
|
|
|
|
/**
|
|
* @test
|
|
*/
|
|
public function canGetLine()
|
|
{
|
|
$this->assertEquals('foo=bar', $this->line->getLine());
|
|
}
|
|
|
|
/**
|
|
* @test
|
|
*/
|
|
public function canGetKey()
|
|
{
|
|
$this->assertEquals('foo', $this->line->getKey());
|
|
}
|
|
|
|
/**
|
|
* @test
|
|
*/
|
|
public function canGetData()
|
|
{
|
|
$this->assertEquals('bar', $this->line->getData());
|
|
}
|
|
|
|
/**
|
|
* @test
|
|
*/
|
|
public function canGetKeyAndDataWithMultipleEquals()
|
|
{
|
|
$line = new Line('foo=bar=baz');
|
|
$this->assertEquals('foo', $line->getKey());
|
|
$this->assertEquals('bar=baz', $line->getData());
|
|
}
|
|
}
|