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:
@@ -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);
|
||||
});
|
16
tests/src/flextype/core/HelpersTest.php
Normal file
16
tests/src/flextype/core/HelpersTest.php
Normal 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());
|
||||
});
|
Reference in New Issue
Block a user