You are here

class ColorTest in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Style/ColorTest.php \ColorTest

Hierarchy

  • class \ColorTest extends \PHPUnit_Framework_TestCase

Expanded class hierarchy of ColorTest

File

vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Style/ColorTest.php, line 6

View source
class ColorTest extends PHPUnit_Framework_TestCase {
  public function setUp() {
    if (!defined('PHPEXCEL_ROOT')) {
      define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
    }
    require_once PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php';
  }

  /**
   * @dataProvider providerColorGetRed
   */
  public function testGetRed() {
    $args = func_get_args();
    $expectedResult = array_pop($args);
    $result = call_user_func_array(array(
      'PHPExcel_Style_Color',
      'getRed',
    ), $args);
    $this
      ->assertEquals($expectedResult, $result);
  }
  public function providerColorGetRed() {
    return new testDataFileIterator('rawTestData/Style/ColorGetRed.data');
  }

  /**
   * @dataProvider providerColorGetGreen
   */
  public function testGetGreen() {
    $args = func_get_args();
    $expectedResult = array_pop($args);
    $result = call_user_func_array(array(
      'PHPExcel_Style_Color',
      'getGreen',
    ), $args);
    $this
      ->assertEquals($expectedResult, $result);
  }
  public function providerColorGetGreen() {
    return new testDataFileIterator('rawTestData/Style/ColorGetGreen.data');
  }

  /**
   * @dataProvider providerColorGetBlue
   */
  public function testGetBlue() {
    $args = func_get_args();
    $expectedResult = array_pop($args);
    $result = call_user_func_array(array(
      'PHPExcel_Style_Color',
      'getBlue',
    ), $args);
    $this
      ->assertEquals($expectedResult, $result);
  }
  public function providerColorGetBlue() {
    return new testDataFileIterator('rawTestData/Style/ColorGetBlue.data');
  }

  /**
   * @dataProvider providerColorChangeBrightness
   */
  public function testChangeBrightness() {
    $args = func_get_args();
    $expectedResult = array_pop($args);
    $result = call_user_func_array(array(
      'PHPExcel_Style_Color',
      'changeBrightness',
    ), $args);
    $this
      ->assertEquals($expectedResult, $result);
  }
  public function providerColorChangeBrightness() {
    return new testDataFileIterator('rawTestData/Style/ColorChangeBrightness.data');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ColorTest::providerColorChangeBrightness public function
ColorTest::providerColorGetBlue public function
ColorTest::providerColorGetGreen public function
ColorTest::providerColorGetRed public function
ColorTest::setUp public function
ColorTest::testChangeBrightness public function @dataProvider providerColorChangeBrightness
ColorTest::testGetBlue public function @dataProvider providerColorGetBlue
ColorTest::testGetGreen public function @dataProvider providerColorGetGreen
ColorTest::testGetRed public function @dataProvider providerColorGetRed