All code for unit tests is now under the `PhpSpreadsheet\Tests` namespace which is autoloaded via composer mechanism. So there is no need for `require()` anymore. Also, tests were moved in `tests/` folder and phpunit should be executed from the project root folder. This is to conform to the de facto standard, notably in use in phpunit itself.
		
			
				
	
	
		
			29 lines
		
	
	
		
			761 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			761 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace PHPExcel;
 | 
						|
 | 
						|
class SettingsTest extends \PHPUnit_Framework_TestCase
 | 
						|
{
 | 
						|
 | 
						|
    public function setUp()
 | 
						|
    {
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     */
 | 
						|
    public function testGetXMLSettings()
 | 
						|
    {
 | 
						|
        $result = call_user_func(array('PHPExcel\\Settings','getLibXmlLoaderOptions'));
 | 
						|
        $this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR) & $result));
 | 
						|
    }
 | 
						|
 | 
						|
    /**
 | 
						|
     */
 | 
						|
    public function testSetXMLSettings()
 | 
						|
    {
 | 
						|
        call_user_func_array(array('PHPExcel\\Settings','setLibXmlLoaderOptions'), [LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID]);
 | 
						|
        $result = call_user_func(array('PHPExcel\\Settings','getLibXmlLoaderOptions'));
 | 
						|
        $this->assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result));
 | 
						|
    }
 | 
						|
}
 |