1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 14:16:46 +02:00

feat(tests): update and improve tests

This commit is contained in:
Awilum
2021-08-14 19:45:40 +03:00
parent 50bcf99d24
commit 3de64f1b75
2 changed files with 16 additions and 19 deletions

View File

@@ -1,19 +0,0 @@
<?php
declare(strict_types=1);
use Flextype\Flextype;
use Flextype\Content\Content;
use Atomastic\Strings\Strings;
test('test getVersion() method', function () {
$this->assertTrue(!Strings::create(flextype()->getVersion())->isEmpty());
});
test('test getInstance() method', function () {
$firstCall = flextype();
$secondCall = Flextype::getInstance();
$this->assertInstanceOf(Flextype::class, $firstCall);
$this->assertSame($firstCall, $secondCall);
});

View File

@@ -0,0 +1,16 @@
<?php
declare(strict_types=1);
use Flextype\Flextype;
use Flextype\Content\Content;
use Atomastic\Strings\Strings;
use Slim\App;
test('test flextype() helper', function () {
$this->assertSame(flextype(), Flextype::getInstance());
});
test('test app() helper', function () {
$this->assertSame(app(), Flextype::getInstance()->app());
});