1
0
mirror of https://github.com/danielstjules/Stringy.git synced 2025-08-23 13:22:54 +02:00

Stringy->$str became private to ensure its sting content and guarantee zero-exception __toString() execution

This commit is contained in:
gotterdemarung
2013-12-10 22:34:19 +02:00
parent 6e5e5e055f
commit 3458fd79fd
3 changed files with 58 additions and 51 deletions

View File

@@ -11,7 +11,7 @@ class StringyTestCase extends CommonTest
{
$stringy = new S('foo bar', 'UTF-8');
$this->assertInstanceOf('Stringy\Stringy', $stringy);
$this->assertEquals('foo bar', $stringy->str);
$this->assertEquals('foo bar', (string) $stringy);
$this->assertEquals('UTF-8', $stringy->encoding);
}
@@ -49,7 +49,7 @@ class StringyTestCase extends CommonTest
{
$stringy = S::create('foo bar', 'UTF-8');
$this->assertInstanceOf('Stringy\Stringy', $stringy);
$this->assertEquals('foo bar', $stringy->str);
$this->assertEquals('foo bar', (string) $stringy);
$this->assertEquals('UTF-8', $stringy->encoding);
}