Skip to content

Instantly share code, notes, and snippets.

@sdboyer
Last active December 19, 2015 03:38
Show Gist options
  • Select an option

  • Save sdboyer/5891267 to your computer and use it in GitHub Desktop.

Select an option

Save sdboyer/5891267 to your computer and use it in GitHub Desktop.
kinda ugly
<?php
try {
$this->collector->setDefaults('css', array('foo' => 'bar'));
$this->fail('No exception thrown exception when an attempt was made to change protected values while the collector was locked.');
}
catch (\Exception $e) {
$this->assertTrue(TRUE, 'Collector threw appropriate exception on lock violation.');
}
try {
$this->collector->restoreDefaults();
$this->fail('No exception thrown exception when an attempt was made to change protected values while the collector was locked.');
}
catch (\Exception $e) {
$this->assertTrue(TRUE, 'Collector threw appropriate exception on lock violation.');
}
try {
$this->collector->clearBag();
$this->fail('No exception thrown exception when an attempt was made to clear the current bag while the collector was locked.');
}
catch (\Exception $e) {
$this->assertTrue(TRUE, 'Collector threw appropriate exception on lock violation.');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment