/** * @expectedException \Puli\Discovery\Api\NoSuchTypeException * @expectedExceptionMessage type */ public function testFindByTypeAlwaysThrowsException() { $this->discovery->defineType('type'); $this->discovery->findByType('type'); }