PhpSpreadsheet/unitTests/Classes/PHPExcel/Cell/DefaultValueBinderTest.php

34 lines
805 B
PHP
Raw Normal View History

2015-03-27 21:28:26 +00:00
<?php
require_once 'testDataFileIterator.php';
class DefaultValueBinderTest extends PHPUnit_Framework_TestCase
{
public function setUp()
{
if (!defined('PHPEXCEL_ROOT'))
{
define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
}
require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
}
/**
* @dataProvider providerDataTypeForValue
*/
public function testDataTypeForValue()
{
$args = func_get_args();
$expectedResult = array_pop($args);
$result = call_user_func_array(array('PHPExcel_Cell_DefaultValueBinder','dataTypeForValue'),$args);
$this->assertEquals($expectedResult, $result);
}
public function providerDataTypeForValue()
{
return new testDataFileIterator('rawTestData/Cell/DefaultValueBinder.data');
}
}