1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

PHP 5.3 and 5.4 class name support

This commit is contained in:
Aidan Woods 2018-04-17 15:05:39 +01:00
parent c429c47fee
commit 5ab8839d04
No known key found for this signature in database
GPG Key ID: 9A6A8EFAA512BBB9

View File

@ -184,16 +184,16 @@ EXPECTED_HTML;
public function testLateStaticBinding()
{
$parsedown = Parsedown::instance();
$this->assertInstanceOf(Parsedown::class, $parsedown);
$this->assertInstanceOf('Erusev\Parsedown\Parsedown', $parsedown);
// After instance is already called on Parsedown
// subsequent calls with the same arguments return the same instance
$sameParsedown = TestParsedown::instance();
$this->assertInstanceOf(Parsedown::class, $sameParsedown);
$this->assertInstanceOf('Erusev\Parsedown\Parsedown', $sameParsedown);
$this->assertSame($parsedown, $sameParsedown);
$testParsedown = TestParsedown::instance('test late static binding');
$this->assertInstanceOf(TestParsedown::class, $testParsedown);
$this->assertInstanceOf('Erusev\Parsedown\Parsedown', $testParsedown);
$sameInstanceAgain = TestParsedown::instance('test late static binding');
$this->assertSame($testParsedown, $sameInstanceAgain);