Add sanity check test for StringWrapper trait

This commit is contained in:
Timothy Warren 2017-03-24 16:14:36 -04:00
parent 7e705289df
commit 9a4ff3e2e0

View 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);
}
}