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

Made str and encoding protected, added getEncoding

Neither should be private, so as to allow users to easily extend the
class
This commit is contained in:
Daniel St. Jules
2014-02-16 21:22:32 -05:00
parent e5f66c6eca
commit 1965da2e39
3 changed files with 25 additions and 4 deletions

View File

@@ -12,7 +12,7 @@ class StringyTestCase extends CommonTest
$stringy = new S('foo bar', 'UTF-8');
$this->assertInstanceOf('Stringy\Stringy', $stringy);
$this->assertEquals('foo bar', (string) $stringy);
$this->assertEquals('UTF-8', $stringy->encoding);
$this->assertEquals('UTF-8', $stringy->getEncoding());
}
/**
@@ -59,7 +59,7 @@ class StringyTestCase extends CommonTest
$stringy = S::create('foo bar', 'UTF-8');
$this->assertInstanceOf('Stringy\Stringy', $stringy);
$this->assertEquals('foo bar', (string) $stringy);
$this->assertEquals('UTF-8', $stringy->encoding);
$this->assertEquals('UTF-8', $stringy->getEncoding());
}
public function testChaining()