Skip to content

Commit

Permalink
switch to file snapshots instead of html
Browse files Browse the repository at this point in the history
  • Loading branch information
Gummibeer committed Oct 24, 2019
1 parent a1bfeb3 commit 418ea06
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 19 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Expand Up @@ -33,7 +33,6 @@ install:
- travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-suggest --no-interaction

script:
- php -r "echo PHP_EOL.PHP_EOL.phpversion('dom').PHP_EOL.PHP_EOL;"
- vendor/bin/phpmd ./src/ text phpmd.xml
- vendor/bin/phpinsights analyse ./ --format=console ${PHPINSIGHTS_FLAGS} --no-interaction --min-quality=95 --min-complexity=50 --min-architecture=100 --min-style=100 -v
- vendor/bin/phpunit --coverage-text --coverage-clover=build/clover.xml
Expand Down
6 changes: 3 additions & 3 deletions tests/Factories/ExportFactoryTest.php
Expand Up @@ -65,7 +65,7 @@ public function it_can_export_pages(): void
$filePath = __DIR__.'/../export/index.html';

static::assertFileExists($filePath);
static::assertMatchesHtmlSnapshot(file_get_contents($filePath));
static::assertMatchesFileSnapshot($filePath);
}

/** @test */
Expand All @@ -83,10 +83,10 @@ public function it_can_export_a_collection(): void
$filePath2 = __DIR__.'/../export/second-post/index.html';

static::assertFileExists($filePath1);
static::assertMatchesHtmlSnapshot(file_get_contents($filePath1));
static::assertMatchesFileSnapshot($filePath1);

static::assertFileExists($filePath2);
static::assertMatchesHtmlSnapshot(file_get_contents($filePath2));
static::assertMatchesFileSnapshot($filePath2);
}

/** @test */
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

@@ -0,0 +1,2 @@
<h1>first post</h1>

@@ -0,0 +1,2 @@
<h1>second post</h1>

@@ -0,0 +1,2 @@
<h1>hello world</h1>

0 comments on commit 418ea06

Please sign in to comment.