public function testObserverCallsCacheObserverMethodWhenBlockMatches()
{
/** @var Mage_Core_Block_Abstract $testBlock */
$testBlock = $this->getBlockMock('core/abstract', array(), true, array(), 'cacheobserver_test/foo');
$testObserver = $this->getModelMock('StdClass', array('testFoo'), array(), array(), 'cacheobserver_test/observer_foo');
$testObserver->expects($this->once())->method('testFoo')->with(new PHPUnit_Framework_Constraint_IsInstanceOf('Aligent_CacheObserver_Test_Block_Foo'));
$this->replaceByMock('model', 'cacheobserver_test/observer_foo', $testObserver);
$testBlock->toHtml();
}