/** * @expectedException RuntimeException */ public function testGetForWithNoSupportingStorage() { $storage = $this->getStorageMock(); $storage->expects($this->any())->method('supports')->will($this->returnValue(false)); $manager = new StorageManager(); $manager->register($storage); $manager->getFor(new \stdClass()); }