Add sanity check test for StringWrapper trait
This commit is contained in:
parent
7e705289df
commit
9a4ff3e2e0
26
tests/StringWrapperTest.php
Normal file
26
tests/StringWrapperTest.php
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Aviat\Ion\Tests;
|
||||||
|
|
||||||
|
use Aviat\Ion\StringWrapper;
|
||||||
|
use Aviat\Ion\Type\StringType;
|
||||||
|
use PHPUnit\Framework\TestCase;
|
||||||
|
|
||||||
|
class StringWrapperTest extends TestCase {
|
||||||
|
|
||||||
|
protected $wrapper;
|
||||||
|
|
||||||
|
public function setUp()
|
||||||
|
{
|
||||||
|
$this->wrapper = new class {
|
||||||
|
use StringWrapper;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testString()
|
||||||
|
{
|
||||||
|
$str = $this->wrapper->string('foo');
|
||||||
|
$this->assertInstanceOf(StringType::class, $str);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user