composer update
This commit is contained in:
@@ -41,7 +41,7 @@ class OutputFormatterStyleTest extends TestCase
|
||||
$style->setForeground('default');
|
||||
$this->assertEquals("\033[39mfoo\033[39m", $style->apply('foo'));
|
||||
|
||||
$this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException');
|
||||
$this->expectException('InvalidArgumentException');
|
||||
$style->setForeground('undefined-color');
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class OutputFormatterStyleTest extends TestCase
|
||||
$style->setBackground('default');
|
||||
$this->assertEquals("\033[49mfoo\033[49m", $style->apply('foo'));
|
||||
|
||||
$this->{method_exists($this, $_ = 'expectException') ? $_ : 'setExpectedException'}('InvalidArgumentException');
|
||||
$this->expectException('InvalidArgumentException');
|
||||
$style->setBackground('undefined-color');
|
||||
}
|
||||
|
||||
@@ -97,4 +97,19 @@ class OutputFormatterStyleTest extends TestCase
|
||||
$this->assertContains('Invalid option specified: "foo"', $e->getMessage(), '->unsetOption() throws an \InvalidArgumentException when the option does not exist in the available options');
|
||||
}
|
||||
}
|
||||
|
||||
public function testHref()
|
||||
{
|
||||
$prevTerminalEmulator = getenv('TERMINAL_EMULATOR');
|
||||
putenv('TERMINAL_EMULATOR');
|
||||
|
||||
$style = new OutputFormatterStyle();
|
||||
|
||||
try {
|
||||
$style->setHref('idea://open/?file=/path/SomeFile.php&line=12');
|
||||
$this->assertSame("\e]8;;idea://open/?file=/path/SomeFile.php&line=12\e\\some URL\e]8;;\e\\", $style->apply('some URL'));
|
||||
} finally {
|
||||
putenv('TERMINAL_EMULATOR'.($prevTerminalEmulator ? "=$prevTerminalEmulator" : ''));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user