Permalink
Browse files

merged test addition

  • Loading branch information...
2 parents dfcc766 + 46f93ce commit 4b0466f3be345d374d9bd59188b1fcc50912f066 @rodnaph rodnaph committed Nov 16, 2010
Showing with 11 additions and 0 deletions.
  1. +11 −0 tests/php/BoxUK/Reflect/Cache/BaseTest.php
@@ -77,6 +77,17 @@ public function testAfterKeyChangeReceivesTheOldKeyAndTheNewKey() {
$this->cache->setKey( 'new' );
}
+ public function testKeyListenersDoesntRemoveListenersNotAskedToBeRemoved() {
+ $listener1 = $this->getMockListener();
+ $listener2 = $this->getMockListener();
+ $listener2->expects( $this->once() )
+ ->method( 'beforeKeyChange' );
+ $this->cache->addKeyListener( $listener1 );
+ $this->cache->addKeyListener( $listener2 );
+ $this->cache->removeKeyListener( $listener1 );
+ $this->cache->setKey( 'new key' );
+ }
+
}
abstract class MyKeyListener implements KeyListener {}

0 comments on commit 4b0466f

Please sign in to comment.