Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
endelwar committed Dec 21, 2023
1 parent 134a65f commit 905c83c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 2

Expand All @@ -31,16 +31,15 @@ jobs:
extensions: imagick, fileinfo, mbstring
coverage: xdebug

- name: Determine Composer cache directory
id: composer-cache
run: echo "::set-output name=directory::$(composer config cache-dir)"

- name: Cache Composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.directory }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.dependencies }}-composer-
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.dependencies }}-composer-

- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
Expand Down
10 changes: 9 additions & 1 deletion tests/Pepeverde/Mailer2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ public function testSend(): void
$mailer->setEmailFromName('Jane Doe');
$mailer->setEmailFromEmail('janedoe@example.com');
$mailer->setEmailReplyToEmail('johndoe@example.com');
$mailer->setAttachments([__DIR__ . '/../resources/mail-template/mail.html.twig']);
$attachment = [
'name' => 'mail.html.twig',
'type' => 'text/html',
'tmp_name' => __DIR__ . '/../resources/mail-template/mail.html.twig',
'error' => 0,
'size' => 72,

];
$mailer->setAttachments([$attachment]);
$count = $mailer->sendMessage(
'noreplay@example.com',
'Subject of email'
Expand Down

0 comments on commit 905c83c

Please sign in to comment.