Skip to content

Commit

Permalink
add snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
BostjanOb committed Feb 24, 2024
1 parent 0d9bda5 commit 81524c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Upn Generator

[![Run Tests](https://github.com/Media24si/UpnGenerator/actions/workflows/run-tests.yml/badge.svg)](https://github.com/Media24si/UpnGenerator/actions/workflows/run-tests.yml)
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)

# Installation
Expand Down
6 changes: 6 additions & 0 deletions tests/Unit/GdResourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@

expect($gdResource)->toBeInstanceOf(\GdImage::class);
});

it('generates same png as snapshot', function () {
$png = getDefaultUpn()->png();

expect(md5($png))->toBe(md5_file(__DIR__.'/../snapshots/default.png'));
});
Binary file added tests/snapshots/default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 81524c4

Please sign in to comment.