<commit_before><?php

namespace Brera\ImageProcessor;

class GdResizeCommandTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function itShouldImplementImageProcessorCommandInterface()
    {
        $command = new GdResizeCommand(1, 1);
        $this->assertInstanceOf(ImageProcessorCommand::class, $command);
    }

    /**
     * @test
     * @expectedException \Brera\ImageProcessor\InvalidImageDimensionException
     * @expectedExceptionMessage Expected integer as image width, got string.
     */
    public function itShouldFailIfWidthIsNotAnInteger()
    {
        (new GdResizeCommand('foo', 1))->execute('');
    }

    /**
     * @test
     * @expectedException \Brera\ImageProcessor\InvalidImageDimensionException
     * @expectedExceptionMessage Image width should be greater then zero, got 0.
     */
    public function itShouldFailIfWidthIsNotPositive()
    {
        (new GdResizeCommand(0, 1))->execute('');
    }<commit_msg>Issue #67: Add missing GdResize command test coverage annotation<commit_after><?php

namespace Brera\ImageProcessor;

/**
 * @covers \Brera\ImageProcessor\GdResizeCommand
 */
class GdResizeCommandTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @test
     */
    public function itShouldImplementImageProcessorCommandInterface()
    {
        $command = new GdResizeCommand(1, 1);
        $this->assertInstanceOf(ImageProcessorCommand::class, $command);
    }

    /**
     * @test
     * @expectedException \Brera\ImageProcessor\InvalidImageDimensionException
     * @expectedExceptionMessage Expected integer as image width, got string.
     */
    public function itShouldFailIfWidthIsNotAnInteger()
    {
        (new GdResizeCommand('foo', 1))->execute('');
    }

    /**
     * @test
     * @expectedException \Brera\ImageProcessor\InvalidImageDimensionException
     * @expectedExceptionMessage Image width should be greater then zero, got 0.
     */
    public function itShouldFailIfWidthIsNotPositive()
    {
        (new GdResizeCommand(0, 1))->execute('');
    }
{'fraction_non_alphanumeric': 0.10485436893203884, 'fraction_numerical': 0.006796116504854369, 'mean_word_length': 3.3572938689217757, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2139138', 'n_tokens_mistral': 574, 'n_tokens_neox': 573, 'n_words': 116}