assertTrue( $pieChart instanceof ezcGraphPieChart, 'ezcGraph::create did not return a ezcGraphPieChart' ); } public function testFactoryLineChart() { $lineChart = ezcGraph::create( 'Line' ); $this->assertTrue( $lineChart instanceof ezcGraphLineChart, 'ezcGraph::create did not return a ezcGraphLineChart' ); } public function testFactoryUnknownChart() { try { $unknownChart = ezcGraph::create( 'Unknown' ); } catch ( ezcGraphUnknownChartTypeException $e ) { return true; } $this->fail( 'Expected ezcGraphUnknownChartTypeException' ); } } ?>