izzum\statemachine\utils\UtilsTest::shouldWrapException PHP Method

shouldWrapException() public method

public shouldWrapException ( )
    public function shouldWrapException()
    {
        $e = new \Exception('test', 0);
        try {
            Utils::wrapToStateMachineException($e, 1, true);
            $this->fail('should not come here');
        } catch (\Exception $e) {
            $this->assertEquals(1, $e->getCode());
            $this->assertEquals('test', $e->getMessage());
            $this->assertTrue(is_a($e, '\\izzum\\statemachine\\Exception'));
        }
    }