/** * @expectedException \RuntimeException */ public function testGetEmptyList() { $adapter = $this->createMock('Enum\\Adapter\\AdapterInterface'); $adapter->expects($this->once())->method('get')->will($this->returnValue(array())); $manager = new EnumManager($adapter); $manager->getList(1); }