Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
<?php include dirname(__FILE__).'/../bootstrap/unit.php'; $t = new lime_test(2, new lime_output_color()); class ProjectConfiguration1 extends sfProjectConfiguration { public function setup() { $this->setPlugins(array()); } } class ProjectConfiguration2 extends sfProjectConfiguration { public function setup() { $this->enablePlugins(array('sfPropelPlugin')); } } $projectConfig = new ProjectConfiguration1(getcwd()); try { new myPropelGuardPluginConfiguration($projectConfig); $t->fail('configuration throws an exception if sfPropelPlugin is not enabled'); } catch (Exception $e) { $t->pass('configuration throws an exception if sfPropelPlugin is not enabled'); } $projectConfig = new ProjectConfiguration2(getcwd()); try { new myPropelGuardPluginConfiguration($projectConfig); $t->pass('configuration does not throw an exception if sfPropelPlugin is enabled'); } catch (Exception $e) { $t->fail('configuration does not throw an exception if sfPropelPlugin is enabled'); }
This paste will be private.
From the Design Piracy series on my blog: