public function testBuild() { $prev = $this->createException('Ich bin die Exception davor'); $ex = Exception::build('Es wurden %d ints und bla als "%s" gefunden', 17, "blubb")->setCode(7)->setPrevious(new \Exception('leer'))->end(); $this->assertEquals('Es wurden 17 ints und bla als "blubb" gefunden', $ex->getMessage()); $this->assertEquals(7, $ex->getCode()); }