mirror of
https://github.com/Intervention/image.git
synced 2025-08-30 17:19:50 +02:00
Merge branch 'feature/testing-coverage-improvements' into next
This commit is contained in:
@@ -23,6 +23,12 @@ class TextBlock extends Collection
|
|||||||
return $this->items;
|
return $this->items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get line by given key
|
||||||
|
*
|
||||||
|
* @param mixed $key
|
||||||
|
* @return null|Line
|
||||||
|
*/
|
||||||
public function line($key): ?Line
|
public function line($key): ?Line
|
||||||
{
|
{
|
||||||
if (!array_key_exists($key, $this->lines())) {
|
if (!array_key_exists($key, $this->lines())) {
|
||||||
|
@@ -11,7 +11,7 @@ use Intervention\Image\Tests\TestCase;
|
|||||||
/**
|
/**
|
||||||
* @covers \Intervention\Image\Colors\Hsl\Channels\Hue
|
* @covers \Intervention\Image\Colors\Hsl\Channels\Hue
|
||||||
* @covers \Intervention\Image\Colors\Hsl\Channels\Saturation
|
* @covers \Intervention\Image\Colors\Hsl\Channels\Saturation
|
||||||
* @covers \Intervention\Image\Colors\Hsl\Channels\Value
|
* @covers \Intervention\Image\Colors\Hsl\Channels\Luminance
|
||||||
*/
|
*/
|
||||||
class ChannelTest extends TestCase
|
class ChannelTest extends TestCase
|
||||||
{
|
{
|
||||||
|
@@ -13,6 +13,13 @@ class OriginTest extends TestCase
|
|||||||
|
|
||||||
$origin = new Origin('image/gif');
|
$origin = new Origin('image/gif');
|
||||||
$this->assertEquals('image/gif', $origin->mediaType());
|
$this->assertEquals('image/gif', $origin->mediaType());
|
||||||
|
$this->assertEquals('image/gif', $origin->mimetype());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testFilePath(): void
|
||||||
|
{
|
||||||
|
$origin = new Origin('image/jpeg', __DIR__ . '/tests/images/example.jpg');
|
||||||
|
$this->assertEquals(__DIR__ . '/tests/images/example.jpg', $origin->filePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFileExtension(): void
|
public function testFileExtension(): void
|
||||||
|
@@ -35,6 +35,7 @@ class TextBlockTest extends TestCase
|
|||||||
$this->assertEquals('foo', $block->line(0));
|
$this->assertEquals('foo', $block->line(0));
|
||||||
$this->assertEquals('FooBar', $block->line(1));
|
$this->assertEquals('FooBar', $block->line(1));
|
||||||
$this->assertEquals('bar', $block->line(2));
|
$this->assertEquals('bar', $block->line(2));
|
||||||
|
$this->assertNull($block->line(20));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLongestLine(): void
|
public function testLongestLine(): void
|
||||||
|
Reference in New Issue
Block a user