diff --git a/composer.json b/composer.json index 462aff6..f960581 100644 --- a/composer.json +++ b/composer.json @@ -21,5 +21,10 @@ "require-dev": { "pestphp/pest": "^1.21", "phpstan/phpstan": "^1.2" + }, + "config": { + "allow-plugins": { + "pestphp/pest-plugin": true + } } } diff --git a/src/Mira.php b/src/Engine.php similarity index 97% rename from src/Mira.php rename to src/Engine.php index d91c0ee..ab4105e 100644 --- a/src/Mira.php +++ b/src/Engine.php @@ -2,7 +2,7 @@ namespace Mira; -class Mira +class Engine { /** * @var string @@ -19,7 +19,7 @@ class Mira * * @param string $viewsDirectory * @param string $viewExtension - * @throws \Exception + * @throws DirectoryDoesNotExistException */ public function __construct(string $viewsDirectory, string $viewExtension = 'phtml') { diff --git a/tests/ViewsTest.php b/tests/ViewsTest.php index 330325e..b563bea 100644 --- a/tests/ViewsTest.php +++ b/tests/ViewsTest.php @@ -1,18 +1,18 @@ views = new Mira(__DIR__ . '/views'); + $this->views = new Engine(__DIR__ . '/views'); }); it("throws exception", function () { - new Mira(__DIR__ . '/dir/does/not/exist'); + new Engine(__DIR__ . '/dir/does/not/exist'); })->throws(DirectoryDoesNotExistException::class, 'Directory ' . __DIR__ . '/dir/does/not/exist' . ' does not exist'); it('exists', function() { - expect($this->views)->toBeInstanceOf(Mira::class); + expect($this->views)->toBeInstanceOf(Engine::class); }); it("renders a view", function() {