Tests working with color data object.
More...
◆ providerColorChangeBrightness()
ColorTest::providerColorChangeBrightness |
( |
| ) |
|
◆ providerColorGetBlue()
ColorTest::providerColorGetBlue |
( |
| ) |
|
◆ providerColorGetGreen()
ColorTest::providerColorGetGreen |
( |
| ) |
|
◆ providerColorGetRed()
ColorTest::providerColorGetRed |
( |
| ) |
|
◆ setUp() [1/2]
Definition at line 9 of file ColorTest.php.
References defined.
11 if (!
defined(
'PHPEXCEL_ROOT')) {
12 define(
'PHPEXCEL_ROOT', APPLICATION_PATH .
'/');
14 require_once(PHPEXCEL_ROOT .
'PHPExcel/Autoloader.php');
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
◆ setUp() [2/2]
Definition at line 15 of file ColorTest.php.
17 $this->f =
new Data\Factory();
◆ tearDown()
◆ testChangeBrightness()
ColorTest::testChangeBrightness |
( |
| ) |
|
providerColorChangeBrightness
Definition at line 68 of file ColorTest.php.
References $result, and array.
70 $args = func_get_args();
71 $expectedResult = array_pop($args);
72 $result = call_user_func_array(
array(
'PHPExcel_Style_Color',
'changeBrightness'),$args);
73 $this->assertEquals($expectedResult,
$result);
Create styles array
The data for the language used.
◆ testDarkness()
ColorTest::testDarkness |
( |
| ) |
|
Definition at line 131 of file ColorTest.php.
133 $v = $this->f->color(
'#6541f4');
134 $this->assertEquals(
true, $v->isDark());
◆ testDarkness2()
ColorTest::testDarkness2 |
( |
| ) |
|
Definition at line 137 of file ColorTest.php.
139 $v = $this->f->color(
'#c1f441');
140 $this->assertEquals(
false, $v->isDark());
◆ testFullHexValue()
ColorTest::testFullHexValue |
( |
| ) |
|
Definition at line 25 of file ColorTest.php.
References array.
27 $v = $this->f->color(
'#0fff2f');
29 $this->assertEquals(
'#0fff2f', $v->asHex());
30 $this->assertEquals(
'rgb(15, 255, 47)', $v->asRGBString());
31 $this->assertEquals(
array(15, 255, 47), $v->asArray());
32 $this->assertEquals(15, $v->r());
33 $this->assertEquals(255, $v->g());
34 $this->assertEquals(47, $v->b());
Create styles array
The data for the language used.
◆ testGetBlue()
ColorTest::testGetBlue |
( |
| ) |
|
providerColorGetBlue
Definition at line 52 of file ColorTest.php.
References $result, and array.
54 $args = func_get_args();
55 $expectedResult = array_pop($args);
56 $result = call_user_func_array(
array(
'PHPExcel_Style_Color',
'getBlue'),$args);
57 $this->assertEquals($expectedResult,
$result);
Create styles array
The data for the language used.
◆ testGetGreen()
ColorTest::testGetGreen |
( |
| ) |
|
providerColorGetGreen
Definition at line 36 of file ColorTest.php.
References $result, and array.
38 $args = func_get_args();
39 $expectedResult = array_pop($args);
40 $result = call_user_func_array(
array(
'PHPExcel_Style_Color',
'getGreen'),$args);
41 $this->assertEquals($expectedResult,
$result);
Create styles array
The data for the language used.
◆ testGetRed()
ColorTest::testGetRed |
( |
| ) |
|
providerColorGetRed
Definition at line 20 of file ColorTest.php.
References $result, and array.
22 $args = func_get_args();
23 $expectedResult = array_pop($args);
24 $result = call_user_func_array(
array(
'PHPExcel_Style_Color',
'getRed'),$args);
25 $this->assertEquals($expectedResult,
$result);
Create styles array
The data for the language used.
◆ testRBGValue()
ColorTest::testRBGValue |
( |
| ) |
|
Definition at line 53 of file ColorTest.php.
References array.
55 $v = $this->f->color(
array(15,255,47));
56 $this->assertEquals(
'#0fff2f', $v->asHex());
57 $this->assertEquals(
'rgb(15, 255, 47)', $v->asRGBString());
58 $this->assertEquals(
array(15, 255, 47), $v->asArray());
Create styles array
The data for the language used.
◆ testShortHexValue()
ColorTest::testShortHexValue |
( |
| ) |
|
Definition at line 37 of file ColorTest.php.
References array.
39 $v = $this->f->color(
'#f0f');
40 $this->assertEquals(
'#ff00ff', $v->asHex());
41 $this->assertEquals(
'rgb(255, 0, 255)', $v->asRGBString());
42 $this->assertEquals(
array(255, 0, 255), $v->asArray());
Create styles array
The data for the language used.
◆ testShortHexValue2()
ColorTest::testShortHexValue2 |
( |
| ) |
|
Definition at line 45 of file ColorTest.php.
References array.
47 $v = $this->f->color(
'f0f');
48 $this->assertEquals(
'#ff00ff', $v->asHex());
49 $this->assertEquals(
'rgb(255, 0, 255)', $v->asRGBString());
50 $this->assertEquals(
array(255, 0, 255), $v->asArray());
Create styles array
The data for the language used.
◆ testWrongHexValue()
ColorTest::testWrongHexValue |
( |
| ) |
|
Definition at line 101 of file ColorTest.php.
104 $v = $this->f->color(
'1234');
105 $this->assertFalse(
"This should not happen.");
107 $this->assertTrue(
true);
◆ testWrongHexValue2()
ColorTest::testWrongHexValue2 |
( |
| ) |
|
Definition at line 111 of file ColorTest.php.
114 $v = $this->f->color(
'#ff');
115 $this->assertFalse(
"This should not happen.");
117 $this->assertTrue(
true);
◆ testWrongHexValue4()
ColorTest::testWrongHexValue4 |
( |
| ) |
|
Definition at line 121 of file ColorTest.php.
124 $v = $this->f->color(
'#gg0000');
125 $this->assertFalse(
"This should not happen.");
127 $this->assertTrue(
true);
◆ testWrongRBGValue()
ColorTest::testWrongRBGValue |
( |
| ) |
|
Definition at line 61 of file ColorTest.php.
References array.
64 $v = $this->f->color(
array(-1,0,0));
65 $this->assertFalse(
"This should not happen.");
67 $this->assertTrue(
true);
Create styles array
The data for the language used.
◆ testWrongRBGValue2()
ColorTest::testWrongRBGValue2 |
( |
| ) |
|
Definition at line 71 of file ColorTest.php.
References array.
74 $v = $this->f->color(
array(256,0,0));
75 $this->assertFalse(
"This should not happen.");
77 $this->assertTrue(
true);
Create styles array
The data for the language used.
◆ testWrongRBGValue3()
ColorTest::testWrongRBGValue3 |
( |
| ) |
|
Definition at line 81 of file ColorTest.php.
References array.
84 $v = $this->f->color(
array(1,1,
'123'));
85 $this->assertFalse(
"This should not happen.");
87 $this->assertTrue(
true);
Create styles array
The data for the language used.
◆ testWrongRBGValue4()
ColorTest::testWrongRBGValue4 |
( |
| ) |
|
Definition at line 91 of file ColorTest.php.
References array.
94 $v = $this->f->color(
array());
95 $this->assertFalse(
"This should not happen.");
97 $this->assertTrue(
true);
Create styles array
The data for the language used.
The documentation for this class was generated from the following file:
- libs/composer/vendor/phpoffice/phpexcel/unitTests/Classes/PHPExcel/Style/ColorTest.php