diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2006-09-21 13:53:00 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2006-09-21 13:53:00 +0000 |
commit | dcd873bad4300cc0b91b3686a10077dd921b9ead (patch) | |
tree | cb525c6f435ef37794e7f48ebae91e04d02d71f2 /src/colors | |
parent | 42c8dd89ede66876ad7101fbbc9ce1d0f690f63b (diff) | |
download | zetacomponents-graph-dcd873bad4300cc0b91b3686a10077dd921b9ead.zip zetacomponents-graph-dcd873bad4300cc0b91b3686a10077dd921b9ead.tar.gz |
- Added tests for gradient setters, getters and fallback
Diffstat (limited to 'src/colors')
-rw-r--r-- | src/colors/linear_gradient.php | 8 | ||||
-rw-r--r-- | src/colors/radial_gradient.php | 13 |
2 files changed, 11 insertions, 10 deletions
diff --git a/src/colors/linear_gradient.php b/src/colors/linear_gradient.php index 6d6fd7b..f1fe1c7 100644 --- a/src/colors/linear_gradient.php +++ b/src/colors/linear_gradient.php @@ -80,9 +80,9 @@ class ezcGraphLinearGradient extends ezcGraphColor } break; case 'startColor': - if ( !$propertyValue instanceof ezcGraphCoordinate ) + if ( !$propertyValue instanceof ezcGraphColor ) { - throw new ezcBaseValueException( $propertyName, $propertyValue, 'ezcGraphCoordinate' ); + throw new ezcBaseValueException( $propertyName, $propertyValue, 'ezcGraphColor' ); } else { @@ -90,9 +90,9 @@ class ezcGraphLinearGradient extends ezcGraphColor } break; case 'endColor': - if ( !$propertyValue instanceof ezcGraphCoordinate ) + if ( !$propertyValue instanceof ezcGraphColor ) { - throw new ezcBaseValueException( $propertyName, $propertyValue, 'ezcGraphCoordinate' ); + throw new ezcBaseValueException( $propertyName, $propertyValue, 'ezcGraphColor' ); } else { diff --git a/src/colors/radial_gradient.php b/src/colors/radial_gradient.php index 54f2946..abc34cf 100644 --- a/src/colors/radial_gradient.php +++ b/src/colors/radial_gradient.php @@ -33,8 +33,9 @@ class ezcGraphRadialGradient extends ezcGraphColor /** * Constructor * - * @param ezcGraphCoordinate $startPoint - * @param ezcGraphCoordinate $endPoint + * @param ezcGraphCoordinate $center + * @param mixed $width + * @param mixed $height * @param ezcGraphColor $startColor * @param ezcGraphColor $endColor * @return void @@ -85,9 +86,9 @@ class ezcGraphRadialGradient extends ezcGraphColor $this->properties['offset'] = min( 0, max( 1, (float) $propertyValue ) ); break; case 'startColor': - if ( !$propertyValue instanceof ezcGraphCoordinate ) + if ( !$propertyValue instanceof ezcGraphColor ) { - throw new ezcBaseValueException( $propertyName, $propertyValue, 'ezcGraphCoordinate' ); + throw new ezcBaseValueException( $propertyName, $propertyValue, 'ezcGraphColor' ); } else { @@ -95,9 +96,9 @@ class ezcGraphRadialGradient extends ezcGraphColor } break; case 'endColor': - if ( !$propertyValue instanceof ezcGraphCoordinate ) + if ( !$propertyValue instanceof ezcGraphColor ) { - throw new ezcBaseValueException( $propertyName, $propertyValue, 'ezcGraphCoordinate' ); + throw new ezcBaseValueException( $propertyName, $propertyValue, 'ezcGraphColor' ); } else { |