summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKore Nordmann <github@kore-nordmann.de>2007-02-15 13:09:36 +0000
committerKore Nordmann <github@kore-nordmann.de>2007-02-15 13:09:36 +0000
commitd3c0d8a0f12ae2a9a9252adeb527843171150e99 (patch)
tree8d06c7dc0b0c510402dccf09cdc809c4c7ea7b0b /tests
parent9873a43cd9fa983041ae97ea56d7a50fc569102e (diff)
downloadzetacomponents-graph-d3c0d8a0f12ae2a9a9252adeb527843171150e99.zip
zetacomponents-graph-d3c0d8a0f12ae2a9a9252adeb527843171150e99.tar.gz
- Another case fixed for bug #10018.
Diffstat (limited to 'tests')
-rw-r--r--tests/data/compare/ezcGraphDateAxisTest_testMonthInterval4.svg2
-rw-r--r--tests/date_axis_test.php25
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/data/compare/ezcGraphDateAxisTest_testMonthInterval4.svg b/tests/data/compare/ezcGraphDateAxisTest_testMonthInterval4.svg
new file mode 100644
index 0000000..c13d42b
--- /dev/null
+++ b/tests/data/compare/ezcGraphDateAxisTest_testMonthInterval4.svg
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg" width="500" height="200" version="1.0" id="ezcGraph"><defs/><g id="ezcGraphChart" color-rendering="optimizeQuality" shape-rendering="geometricPrecision" text-rendering="optimizeLegibility"><path d=" M 0.0000,200.0000 L 0.0000,0.0000 L 500.0000,0.0000 L 500.0000,200.0000 L 0.0000,200.0000 z " style="fill: #eeeeec; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_1"/><path d=" M 0.0000,200.0000 L 0.0000,0.0000 L 100.0000,0.0000 L 100.0000,200.0000 L 0.0000,200.0000 z " style="fill: #000000; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_2"/><path d=" M 2.0000,9.0000 L 9.0000,2.0000 L 16.0000,9.0000 L 9.0000,16.0000 L 2.0000,9.0000 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_3"/><path d=" M 100.0000,180.0000 L 500.0000,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_5"/><path d=" M 492.0000,184.0000 L 500.0000,180.0000 L 492.0000,176.0000 L 492.0000,184.0000 z " style="fill: #2e3436; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_6"/><path d=" M 140.0000,200.0000 L 140.0000,0.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_7"/><path d=" M 137.5000,5.0000 L 140.0000,0.0000 L 142.5000,5.0000 L 137.5000,5.0000 z " style="fill: #2e3436; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_8"/><path d=" M 245.6000,20.0000 L 245.6000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_10"/><path d=" M 246.6667,177.0000 L 246.6667,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_11"/><path d=" M 354.4000,20.0000 L 354.4000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_13"/><path d=" M 353.3333,177.0000 L 353.3333,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_14"/><path d=" M 460.0000,20.0000 L 460.0000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_16"/><path d=" M 460.0000,177.0000 L 460.0000,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_17"/><path d=" M 140.0000,180.0000 L 460.0000,180.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_19"/><path d=" M 140.0000,180.0000 L 143.0000,180.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_20"/><path d=" M 140.0000,160.8000 L 460.0000,159.2000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_22"/><path d=" M 140.0000,160.0000 L 141.0000,160.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_23"/><path d=" M 140.0000,140.0000 L 460.0000,140.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_24"/><path d=" M 140.0000,140.0000 L 141.0000,140.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_25"/><path d=" M 140.0000,120.8000 L 460.0000,119.2000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_26"/><path d=" M 140.0000,120.0000 L 141.0000,120.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_27"/><path d=" M 140.0000,100.0000 L 460.0000,100.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_28"/><path d=" M 140.0000,100.0000 L 143.0000,100.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_29"/><path d=" M 140.0000,80.8000 L 460.0000,79.2000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_31"/><path d=" M 140.0000,80.0000 L 141.0000,80.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_32"/><path d=" M 140.0000,60.0000 L 460.0000,60.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_33"/><path d=" M 140.0000,60.0000 L 141.0000,60.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_34"/><path d=" M 140.0000,40.8000 L 460.0000,39.2000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_35"/><path d=" M 140.0000,40.0000 L 141.0000,40.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_36"/><path d=" M 140.0000,20.0000 L 460.0000,20.0000" style="fill: none; stroke: #000000; stroke-width: 1; stroke-opacity: 0.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_37"/><path d=" M 140.0000,20.0000 L 143.0000,20.0000" style="fill: none; stroke: #2e3436; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_38"/><path d=" M 186.2008,37.1937 L 186.2008,37.1937" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_40"/><path d=" M 186.2008,37.1937 L 236.1037,58.2204" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_41"/><path d=" M 236.1037,58.2204 L 310.7358,76.6188" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_42"/><path d=" M 310.7358,76.6188 L 339.1671,95.0171" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_43"/><path d=" M 339.1671,95.0171 L 364.0444,126.5572" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_44"/><path d=" M 364.0444,126.5572 L 385.3679,150.2122" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_45"/><path d=" M 385.3679,150.2122 L 445.7844,176.3860" style="fill: none; stroke: #3465a4; stroke-width: 1; stroke-opacity: 1.00; stroke-linecap: round; stroke-linejoin: round;" id="ezcGraphLine_46"/><path d=" M 183.2008,37.1937 L 186.2008,34.1937 L 189.2008,37.1937 L 186.2008,40.1937 L 183.2008,37.1937 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_47"/><path d=" M 233.1037,58.2204 L 236.1037,55.2204 L 239.1037,58.2204 L 236.1037,61.2204 L 233.1037,58.2204 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_48"/><path d=" M 307.7358,76.6188 L 310.7358,73.6188 L 313.7358,76.6188 L 310.7358,79.6188 L 307.7358,76.6188 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_49"/><path d=" M 336.1671,95.0171 L 339.1671,92.0171 L 342.1671,95.0171 L 339.1671,98.0171 L 336.1671,95.0171 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_50"/><path d=" M 361.0444,126.5572 L 364.0444,123.5572 L 367.0444,126.5572 L 364.0444,129.5572 L 361.0444,126.5572 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_51"/><path d=" M 382.3679,150.2122 L 385.3679,147.2122 L 388.3679,150.2122 L 385.3679,153.2122 L 382.3679,150.2122 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_52"/><path d=" M 442.7844,176.3860 L 445.7844,173.3860 L 448.7844,176.3860 L 445.7844,179.3860 L 442.7844,176.3860 z " style="fill: #3465a4; fill-opacity: 1.00; stroke: none;" id="ezcGraphPolygon_53"/><g id="ezcGraphTextBox_4"><path d=" M 16.5000,17.0000 L 16.5000,1.5000 L 84.7800,1.5000 L 84.7800,17.0000 L 16.5000,17.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_54"/><text id="ezcGraphTextBox_4_text" x="17" text-length="66.78px" y="13.9" style="font-size: 14px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">some data</text></g><g id="ezcGraphTextBox_9"><path d=" M 141.5000,198.0000 L 141.5000,181.5000 L 190.7000,181.5000 L 190.7000,198.0000 L 141.5000,198.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_55"/><text id="ezcGraphTextBox_9_text" x="142" text-length="47.7px" y="194.75" style="font-size: 15px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Oct 06</text></g><g id="ezcGraphTextBox_12"><path d=" M 248.1667,198.0000 L 248.1667,181.5000 L 297.3667,181.5000 L 297.3667,198.0000 L 248.1667,198.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_56"/><text id="ezcGraphTextBox_12_text" x="248.6667" text-length="47.7px" y="194.75" style="font-size: 15px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Nov 06</text></g><g id="ezcGraphTextBox_15"><path d=" M 354.8333,198.0000 L 354.8333,181.5000 L 404.0333,181.5000 L 404.0333,198.0000 L 354.8333,198.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_57"/><text id="ezcGraphTextBox_15_text" x="355.3333" text-length="47.7px" y="194.75" style="font-size: 15px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Dec 06</text></g><g id="ezcGraphTextBox_18"><path d=" M 409.8000,198.0000 L 409.8000,181.5000 L 459.0000,181.5000 L 459.0000,198.0000 L 409.8000,198.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_58"/><text id="ezcGraphTextBox_18_text" x="410.3" text-length="47.7px" y="194.75" style="font-size: 15px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">Jan 07</text></g><g id="ezcGraphTextBox_21"><path d=" M 128.2000,179.0000 L 128.2000,162.5000 L 139.0000,162.5000 L 139.0000,179.0000 L 128.2000,179.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_59"/><text id="ezcGraphTextBox_21_text" x="128.7" text-length="9.3px" y="175.75" style="font-size: 15px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">6</text></g><g id="ezcGraphTextBox_30"><path d=" M 128.2000,99.0000 L 128.2000,82.5000 L 139.0000,82.5000 L 139.0000,99.0000 L 128.2000,99.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_60"/><text id="ezcGraphTextBox_30_text" x="128.7" text-length="9.3px" y="95.75" style="font-size: 15px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">7</text></g><g id="ezcGraphTextBox_39"><path d=" M 128.2000,38.0000 L 128.2000,21.5000 L 139.0000,21.5000 L 139.0000,38.0000 L 128.2000,38.0000 z " style="fill: #ffffff; fill-opacity: 0.00; stroke: none;" id="ezcGraphPolygon_61"/><text id="ezcGraphTextBox_39_text" x="128.7" text-length="9.3px" y="34.75" style="font-size: 15px; font-family: sans-serif; fill: #2e3436; fill-opacity: 1.00; stroke: none;">8</text></g></g></svg>
diff --git a/tests/date_axis_test.php b/tests/date_axis_test.php
index f5a81c0..8a4dbd6 100644
--- a/tests/date_axis_test.php
+++ b/tests/date_axis_test.php
@@ -573,6 +573,31 @@ class ezcGraphDateAxisTest extends ezcGraphTestCase
$this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
);
}
+
+ public function testMonthInterval4()
+ {
+ $filename = $this->tempDir . __FUNCTION__ . '.svg';
+
+ $this->chart->data['some data'] = new ezcGraphArrayDataSet( array(
+ strtotime( '2006-10-16' ) => 7.78507871321,
+ strtotime( '2006-10-30' ) => 7.52224503765,
+ strtotime( '2006-11-20' ) => 7.29226557153,
+ strtotime( '2006-11-28' ) => 7.06228610541,
+ strtotime( '2006-12-05' ) => 6.66803559206,
+ strtotime( '2006-12-11' ) => 6.37234770705,
+ strtotime( '2006-12-28' ) => 6.04517453799,
+ ) );
+ $this->chart->xAxis->startDate = strtotime( '2006-10-03' );
+ $this->chart->xAxis->endDate = strtotime( '2007-01-01' );
+ $this->chart->data['some data']->symbol = ezcGraph::DIAMOND;
+
+ $this->chart->render( 500, 200, $filename );
+
+ $this->compare(
+ $filename,
+ $this->basePath . 'compare/' . __CLASS__ . '_' . __FUNCTION__ . '.svg'
+ );
+ }
}
?>
OpenPOWER on IntegriCloud