| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- /**
- * This file is part of PHPPresentation - A pure PHP library for reading and writing
- * presentations documents.
- *
- * PHPPresentation is free software distributed under the terms of the GNU Lesser
- * General Public License version 3 as published by the Free Software Foundation.
- *
- * For the full copyright and license information, please read the LICENSE
- * file that was distributed with this source code. For the full list of
- * contributors, visit https://github.com/PHPOffice/PHPPresentation/contributors.
- *
- * @copyright 2010-2014 PhpPresentation contributors
- * @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
- * @link https://github.com/PHPOffice/PHPPresentation
- */
- namespace PhpOffice\PhpPresentation\Tests;
- use PhpOffice\PhpPresentation\Autoloader;
- /**
- * Test class for Autoloader
- */
- class AutoloaderTest extends \PHPUnit_Framework_TestCase
- {
- /**
- * Register
- */
- public function testRegister()
- {
- Autoloader::register();
- $this->assertContains(
- array('PhpOffice\\PhpPresentation\\Autoloader', 'autoload'),
- spl_autoload_functions()
- );
- }
- /**
- * Autoload
- */
- public function testAutoload()
- {
- $declared = get_declared_classes();
- $declaredCount = count($declared);
- Autoloader::autoload('Foo');
- $this->assertEquals(
- $declaredCount,
- count(get_declared_classes()),
- 'PhpOffice\\PhpPresentation\\Autoloader::autoload() is trying to load ' .
- 'classes outside of the PhpOffice\\PhpPresentation namespace'
- );
- }
- }
|