<?php

/*
 * This file is part of the league/markua package.
 *
 * (c) Davey Shafik <me@daveyshafik.com>
 *
 * Original code based on the CommonMark JS reference parser (http://bitly.com/commonmarkjs)
 *  - (c) John MacFarlane
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace League\Markua\Tests;

use League\Markua\Extension\MarkuaExtension;
use League\Markua\MarkuaConverter;

class ExtensionTest extends \PHPUnit_Framework_TestCase {
    public function testGetExtensionName()
    {
        $extension = new MarkuaExtension();
        $this->assertEquals('markua', $extension->getName());
    }
    
    public function testConvertor()
    {
        $convertor = new MarkuaConverter();
        $this->assertEquals('markua', $convertor->getDocParser()->getEnvironment()->getExtensions()[0]->getName());
        $this->assertEquals('markua', $convertor->getHtmlRenderer()->getEnvironment()->getExtensions()[0]->getName());
    }
}

<?php

/*
 * This file is part of the league/markua package.
 *
 * (c) Davey Shafik <me@daveyshafik.com>
 *
 * Original code based on the CommonMark JS reference parser (http://bitly.com/commonmarkjs)
 *  - (c) John MacFarlane
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace League\Markua\Tests;

use League\Markua\Extension\MarkuaExtension;
use League\Markua\MarkuaConverter;

class ExtensionTest extends \PHPUnit_Framework_TestCase {
    public function testGetExtensionName()
    {
        $extension = new MarkuaExtension();
        $this->assertEquals('markua', $extension->getName());
    }
    
    public function testConvertor()
    {
        $convertor = new MarkuaConverter();
        $extensions = $convertor->getDocParser()->getEnvironment()->getExtensions();
        $this->assertEquals('markua', $extensions[0]->getName());
        
        $extensions = $convertor->getHtmlRenderer()->getEnvironment()->getExtensions();
        $this->assertEquals('markua', $extensions[0]->getName());
    }
}

Fix tests for PHP 5.3
Fix tests for PHP 5.3
