Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

Commit

Permalink
File system unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
supergrecko committed Apr 7, 2019
1 parent 6155012 commit 9250f3b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/Framework/TemplateTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace RiotQuest\Tests\Framework;

use PHPUnit\Framework\TestCase;
use RiotQuest\Components\Framework\Engine\Filesystem;

class TemplateTest extends TestCase
{

/**
* Test that the collection template works
*
* @throws \ReflectionException
*/
public function testTemplateGeneration()
{
(new Filesystem())->generateTemplates();
$this->assertFileExists(__DIR__ . '/../../src/storage/templates/manifest.json');
}

/**
* Tests that wiping all the templates works
*/
public function testTemplateFlush()
{
(new Filesystem())->flushTemplates();
$this->assertFileNotExists(__DIR__ . '/../../src/storage/templates/manifest.json');
}

}

0 comments on commit 9250f3b

Please sign in to comment.