From f0be0a0e4f2c653532ae99d72064972801d8e8e4 Mon Sep 17 00:00:00 2001 From: Frederik Bosch Date: Mon, 28 Oct 2019 11:10:29 +0100 Subject: [PATCH] Bug 59 (#60) * bug 59 is invalid, fixes #59 * fix lint, add some convenience scripts * use php 7.3.11 in appveyor --- .appveyor.yml | 6 ++---- composer.json | 11 +++++++++++ test/Stub/AlternativeText/bug_59.html | 10 ++++++++++ test/Stub/AlternativeText/bug_59.txt | 1 + test/Unit/AddressListTest.php | 4 ++-- test/Unit/AlternativeTextTest.php | 1 + 6 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 test/Stub/AlternativeText/bug_59.html create mode 100644 test/Stub/AlternativeText/bug_59.txt diff --git a/.appveyor.yml b/.appveyor.yml index 78b03712..9f934a30 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,11 +7,9 @@ clone_folder: c:\projects\php-project-workspace environment: matrix: - dependencies: lowest - php_ver_target: 7.1.12 + php_ver_target: 7.3.11 - dependencies: highest - php_ver_target: 7.1.12 - - dependencies: highest - php_ver_target: 7.2 + php_ver_target: 7.3.11 ## Cancel all if one fails matrix: diff --git a/composer.json b/composer.json index 4b9617b1..5f0e7b08 100644 --- a/composer.json +++ b/composer.json @@ -34,5 +34,16 @@ "psr-4": { "Genkgo\\TestMail\\": ["test"] } + }, + "scripts": { + "lint": [ + "./vendor/bin/php-cs-fixer fix --verbose --config .php_cs.dist ./src ./test" + ], + "test": [ + "./vendor/bin/phpunit -c phpunit.xml", + "./vendor/bin/php-cs-fixer fix --verbose --dry-run --config .php_cs.dist ./src ./test", + "./vendor/bin/phpstan analyse -l max src", + "./vendor/bin/phpstan analyse -l max -c .phpstan.test.neon test" + ] } } diff --git a/test/Stub/AlternativeText/bug_59.html b/test/Stub/AlternativeText/bug_59.html new file mode 100644 index 00000000..792a3496 --- /dev/null +++ b/test/Stub/AlternativeText/bug_59.html @@ -0,0 +1,10 @@ + + + + + Title + + +

zażółć gęślą jaźń

+ + \ No newline at end of file diff --git a/test/Stub/AlternativeText/bug_59.txt b/test/Stub/AlternativeText/bug_59.txt new file mode 100644 index 00000000..8d9f6626 --- /dev/null +++ b/test/Stub/AlternativeText/bug_59.txt @@ -0,0 +1 @@ +zażółć gęślą jaźń \ No newline at end of file diff --git a/test/Unit/AddressListTest.php b/test/Unit/AddressListTest.php index 6133c73d..6e24750d 100644 --- a/test/Unit/AddressListTest.php +++ b/test/Unit/AddressListTest.php @@ -55,14 +55,14 @@ public function it_is_immutable() $addressList, $addressList->withAddress( new Address(new EmailAddress('me1@example.com'), 'name') - ) + ) ); $this->assertNotSame( $addressList, $addressList->withoutAddress( new Address(new EmailAddress('me1@example.com'), 'name') - ) + ) ); } diff --git a/test/Unit/AlternativeTextTest.php b/test/Unit/AlternativeTextTest.php index 3d5fa4fd..e35163c5 100644 --- a/test/Unit/AlternativeTextTest.php +++ b/test/Unit/AlternativeTextTest.php @@ -41,6 +41,7 @@ public function provideHtmlFiles() return [ ['simple.html', 'simple.crlf.txt'], ['error.html', 'error.txt'], + ['bug_59.html', 'bug_59.txt'], ]; } }