1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-16 18:24:03 +02:00

Add Stringy\create function for PHP 5.6

This commit is contained in:
Daniel St. Jules
2015-01-01 21:38:58 -08:00
parent 350d1e6f8e
commit 27ef5a8914
5 changed files with 57 additions and 2 deletions

16
tests/CreateTest.php Normal file
View File

@@ -0,0 +1,16 @@
<?php
require __DIR__ . '/../src/Create.php';
use function Stringy\create as s;
class CreateTestCase extends PHPUnit_Framework_TestCase
{
public function testCreate()
{
$stringy = s('foo bar', 'UTF-8');
$this->assertInstanceOf('Stringy\Stringy', $stringy);
$this->assertEquals('foo bar', (string) $stringy);
$this->assertEquals('UTF-8', $stringy->getEncoding());
}
}