mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-05 22:52:49 +08:00
移动 tests 到 thinkphp 目录
This commit is contained in:
34
tests/thinkphp/library/think/config/driver/xmlTest.php
Normal file
34
tests/thinkphp/library/think/config/driver/xmlTest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Xml配置测试
|
||||
*
|
||||
* @author 7IN0SAN9 <me@7in0.me>
|
||||
*/
|
||||
|
||||
namespace think\config\driver;
|
||||
|
||||
use think\config;
|
||||
|
||||
class xmlTest extends \PHPUnit_Framework_TestCase
|
||||
{
|
||||
public function testParse()
|
||||
{
|
||||
Config::parse('<?xml version="1.0"?><document><xmlstring>1</xmlstring></document>', 'xml');
|
||||
$this->assertEquals(1, Config::get('xmlstring'));
|
||||
Config::reset();
|
||||
Config::parse('thinkphp/tests/fixtures/config.xml');
|
||||
$this->assertTrue(Config::has('xmlfile.istrue'));
|
||||
$this->assertEquals(1, Config::get('xmlfile.istrue'));
|
||||
Config::reset();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user