diff --git a/graph.dot b/graph.dot index 87fb55f..318536a 100644 --- a/graph.dot +++ b/graph.dot @@ -1,37 +1,37 @@ digraph stack_trace { subgraph cluster_throwables { label="Thrown" - exception_00000000000002ba0000000000000000 -> exception_00000000000004c90000000000000000 [label="Caused by"]; - exception_00000000000004c90000000000000000 [shape="doubleoctagon", style="filled", fillcolor="#ff0000", label="TypeError[42](foo)", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; - exception_00000000000002ba0000000000000000 [shape="doubleoctagon", style="filled", fillcolor="#ff0000", label="Innmind\\StackTrace\\Exception\\DomainException[0]()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php"]; + exception_0000000000000afb0000000000000000 -> exception_00000000000005a80000000000000000 [label="Caused by"]; + exception_00000000000005a80000000000000000 [shape="doubleoctagon", style="filled", fillcolor="#ff0000", label="TypeError[42](foo)", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; + exception_0000000000000afb0000000000000000 [shape="doubleoctagon", style="filled", fillcolor="#ff0000", label="Innmind\\StackTrace\\Exception\\DomainException[0]()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php"]; } subgraph cluster_call_frames { label="Stack Trace" - call_frame_4f9ea46a7375c109da69901c633013a9 -> call_frame_53aaccb6492409f5e3f3865fc706111e [label="/Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php:70", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; + call_frame_4f9ea46a7375c109da69901c633013a9 -> call_frame_53aaccb6492409f5e3f3865fc706111e [label="tests/CallFramesTest.php:70", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; call_frame_78899d4635295534cfc817b37dee2513 -> call_frame_4f9ea46a7375c109da69901c633013a9; - call_frame_7945ef788bc897e87fc2d31edd4537b5 -> call_frame_78899d4635295534cfc817b37dee2513 [label="/Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php:82", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; - call_frame_9914fdd0b965fa974e826064877ece14 -> call_frame_7945ef788bc897e87fc2d31edd4537b5 [label="/Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php:62", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; + call_frame_7945ef788bc897e87fc2d31edd4537b5 -> call_frame_78899d4635295534cfc817b37dee2513 [label="tests/CallFramesTest.php:82", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; + call_frame_9914fdd0b965fa974e826064877ece14 -> call_frame_7945ef788bc897e87fc2d31edd4537b5 [label="tests/CallFramesTest.php:62", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; call_frame_a3479fc68cbbda8c8966caf2abecb4ec -> call_frame_9914fdd0b965fa974e826064877ece14; - call_frame_da9f8aa8271b7ba9a2e8d52bb7f63b65 -> call_frame_a3479fc68cbbda8c8966caf2abecb4ec [label="/Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php:22", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php"]; - call_frame_47c0407195947f117d1878ddc407c0a3 -> call_frame_da9f8aa8271b7ba9a2e8d52bb7f63b65 [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php:1545", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php"]; - call_frame_07f591f613086fa0eafe956f80ef31fa -> call_frame_47c0407195947f117d1878ddc407c0a3 [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php:1151", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php"]; - call_frame_5627b6f9e8560c938320b94b612d2fc0 -> call_frame_07f591f613086fa0eafe956f80ef31fa [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestResult.php:726", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestResult.php"]; - call_frame_9e85687edeee0a8f8bd7f473ec92cc89 -> call_frame_5627b6f9e8560c938320b94b612d2fc0 [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php:903", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php"]; - call_frame_862259868e8b30c44157d4fa168fc13a -> call_frame_9e85687edeee0a8f8bd7f473ec92cc89 [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php:677", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php"]; - call_frame_cc4026df087e27e93e934267183b41f4 -> call_frame_862259868e8b30c44157d4fa168fc13a [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php:677", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php"]; - call_frame_cc4026df087e27e93e934267183b41f4 -> call_frame_cc4026df087e27e93e934267183b41f4 [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php:677", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php"]; - call_frame_c8d6907ef39a015179586fa3b8c89d1a -> call_frame_cc4026df087e27e93e934267183b41f4 [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:673", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/TestRunner.php"]; - call_frame_95bacb9103a97886bc59bc9084f8765c -> call_frame_c8d6907ef39a015179586fa3b8c89d1a [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/Command.php:143", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/Command.php"]; - call_frame_ea22ce8c2ce2b0f720bfdcc70fb908c5 -> call_frame_95bacb9103a97886bc59bc9084f8765c [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/Command.php:96", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/Command.php"]; - call_frame_06e435cf2f8ff07c446385801e950ee7 -> call_frame_ea22ce8c2ce2b0f720bfdcc70fb908c5 [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/phpunit:98", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/phpunit"]; - call_frame_d8b76d2929d9dd7cd5896c117a761475 -> call_frame_06e435cf2f8ff07c446385801e950ee7 [label="/Users/baptouuuu/Sites/innmind/stack-trace/vendor/bin/phpunit:120", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/bin/phpunit"]; + call_frame_4bebae301b668efb03e7bc24f79606a6 -> call_frame_a3479fc68cbbda8c8966caf2abecb4ec [label="tests/RenderTest.php:24", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php"]; + call_frame_47c0407195947f117d1878ddc407c0a3 -> call_frame_4bebae301b668efb03e7bc24f79606a6 [label="vendor/phpunit/phpunit/src/Framework/TestCase.php:1545", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php"]; + call_frame_07f591f613086fa0eafe956f80ef31fa -> call_frame_47c0407195947f117d1878ddc407c0a3 [label="vendor/phpunit/phpunit/src/Framework/TestCase.php:1151", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php"]; + call_frame_5627b6f9e8560c938320b94b612d2fc0 -> call_frame_07f591f613086fa0eafe956f80ef31fa [label="vendor/phpunit/phpunit/src/Framework/TestResult.php:726", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestResult.php"]; + call_frame_9e85687edeee0a8f8bd7f473ec92cc89 -> call_frame_5627b6f9e8560c938320b94b612d2fc0 [label="vendor/phpunit/phpunit/src/Framework/TestCase.php:903", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php"]; + call_frame_862259868e8b30c44157d4fa168fc13a -> call_frame_9e85687edeee0a8f8bd7f473ec92cc89 [label="vendor/phpunit/phpunit/src/Framework/TestSuite.php:677", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php"]; + call_frame_cc4026df087e27e93e934267183b41f4 -> call_frame_862259868e8b30c44157d4fa168fc13a [label="vendor/phpunit/phpunit/src/Framework/TestSuite.php:677", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php"]; + call_frame_cc4026df087e27e93e934267183b41f4 -> call_frame_cc4026df087e27e93e934267183b41f4 [label="vendor/phpunit/phpunit/src/Framework/TestSuite.php:677", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php"]; + call_frame_c8d6907ef39a015179586fa3b8c89d1a -> call_frame_cc4026df087e27e93e934267183b41f4 [label="vendor/phpunit/phpunit/src/TextUI/TestRunner.php:673", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/TestRunner.php"]; + call_frame_95bacb9103a97886bc59bc9084f8765c -> call_frame_c8d6907ef39a015179586fa3b8c89d1a [label="vendor/phpunit/phpunit/src/TextUI/Command.php:143", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/Command.php"]; + call_frame_ea22ce8c2ce2b0f720bfdcc70fb908c5 -> call_frame_95bacb9103a97886bc59bc9084f8765c [label="vendor/phpunit/phpunit/src/TextUI/Command.php:96", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/Command.php"]; + call_frame_06e435cf2f8ff07c446385801e950ee7 -> call_frame_ea22ce8c2ce2b0f720bfdcc70fb908c5 [label="vendor/phpunit/phpunit/phpunit:98", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/phpunit"]; + call_frame_d8b76d2929d9dd7cd5896c117a761475 -> call_frame_06e435cf2f8ff07c446385801e950ee7 [label="vendor/bin/phpunit:120", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/bin/phpunit"]; call_frame_53aaccb6492409f5e3f3865fc706111e [shape="box", style="filled", fillcolor="#ffa500", label="class@anonymous/Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php:74$1e->__invoke()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; call_frame_4f9ea46a7375c109da69901c633013a9 [shape="box", style="filled", fillcolor="#ffa500", label="Tests\\Innmind\\StackTrace\\{closure}()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; call_frame_78899d4635295534cfc817b37dee2513 [shape="box", style="filled", fillcolor="#ffa500", label="Tests\\Innmind\\StackTrace\\foo()"]; call_frame_7945ef788bc897e87fc2d31edd4537b5 [shape="box", style="filled", fillcolor="#ffa500", label="array_walk()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; call_frame_9914fdd0b965fa974e826064877ece14 [shape="box", style="filled", fillcolor="#ffa500", label="Tests\\Innmind\\StackTrace\\CallFramesTest::staticCall()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; call_frame_a3479fc68cbbda8c8966caf2abecb4ec [shape="box", style="filled", fillcolor="#ffa500", label="Tests\\Innmind\\StackTrace\\CallFramesTest::refl()"]; - call_frame_da9f8aa8271b7ba9a2e8d52bb7f63b65 [shape="box", style="filled", fillcolor="#ffa500", label="ReflectionMethod->invoke()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php"]; + call_frame_4bebae301b668efb03e7bc24f79606a6 [shape="box", style="filled", fillcolor="#ffa500", label="ReflectionMethod->invoke()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php"]; call_frame_47c0407195947f117d1878ddc407c0a3 [shape="box", style="filled", fillcolor="#ffa500", label="Tests\\Innmind\\StackTrace\\RenderTest->testInvokation()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php"]; call_frame_07f591f613086fa0eafe956f80ef31fa [shape="box", style="filled", fillcolor="#ffa500", label="PHPUnit\\Framework\\TestCase->runTest()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php"]; call_frame_5627b6f9e8560c938320b94b612d2fc0 [shape="box", style="filled", fillcolor="#ffa500", label="PHPUnit\\Framework\\TestCase->runBare()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestResult.php"]; @@ -44,6 +44,6 @@ digraph stack_trace { call_frame_06e435cf2f8ff07c446385801e950ee7 [shape="box", style="filled", fillcolor="#ffa500", label="PHPUnit\\TextUI\\Command::main()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/phpunit"]; call_frame_d8b76d2929d9dd7cd5896c117a761475 [shape="box", style="filled", fillcolor="#ffa500", label="include()", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/vendor/bin/phpunit"]; } - exception_00000000000004c90000000000000000 -> call_frame_53aaccb6492409f5e3f3865fc706111e [label="/Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php:77", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; - exception_00000000000002ba0000000000000000 -> call_frame_47c0407195947f117d1878ddc407c0a3 [label="/Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php:27", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php"]; + exception_00000000000005a80000000000000000 -> call_frame_53aaccb6492409f5e3f3865fc706111e [label="tests/CallFramesTest.php:77", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php"]; + exception_0000000000000afb0000000000000000 -> call_frame_47c0407195947f117d1878ddc407c0a3 [label="tests/RenderTest.php:29", URL="file:///Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php"]; } \ No newline at end of file diff --git a/graph.svg b/graph.svg index 45d5330..784c954 100644 --- a/graph.svg +++ b/graph.svg @@ -4,11 +4,11 @@ - + stack_trace - + cluster_throwables @@ -16,12 +16,12 @@ cluster_call_frames - -Stack Trace + +Stack Trace - + -exception_00000000000008730000000000000000 +exception_0000000000000afb0000000000000000 @@ -29,42 +29,42 @@ - + -exception_00000000000002a10000000000000000 +exception_00000000000005a80000000000000000 - - -TypeError[42](foo) + + +TypeError[42](foo) - + -exception_00000000000008730000000000000000->exception_00000000000002a10000000000000000 - - -Caused by +exception_0000000000000afb0000000000000000->exception_00000000000005a80000000000000000 + + +Caused by call_frame_47c0407195947f117d1878ddc407c0a3 - -Tests\Innmind\StackTrace\RenderTest->testInvokation() + +Tests\Innmind\StackTrace\RenderTest->testInvokation() - + -exception_00000000000008730000000000000000->call_frame_47c0407195947f117d1878ddc407c0a3 - - - +exception_0000000000000afb0000000000000000->call_frame_47c0407195947f117d1878ddc407c0a3 + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php:27 + +tests/RenderTest.php:29 @@ -77,16 +77,16 @@ - + -exception_00000000000002a10000000000000000->call_frame_53aaccb6492409f5e3f3865fc706111e - - - +exception_00000000000005a80000000000000000->call_frame_53aaccb6492409f5e3f3865fc706111e + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php:77 + +tests/CallFramesTest.php:77 @@ -102,47 +102,47 @@ call_frame_4f9ea46a7375c109da69901c633013a9->call_frame_53aaccb6492409f5e3f3865fc706111e - + - -/Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php:70 + +tests/CallFramesTest.php:70 call_frame_78899d4635295534cfc817b37dee2513 - -Tests\Innmind\StackTrace\foo() + +Tests\Innmind\StackTrace\foo() call_frame_78899d4635295534cfc817b37dee2513->call_frame_4f9ea46a7375c109da69901c633013a9 - - + + call_frame_7945ef788bc897e87fc2d31edd4537b5 - -array_walk() + +array_walk() call_frame_7945ef788bc897e87fc2d31edd4537b5->call_frame_78899d4635295534cfc817b37dee2513 - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php:82 + +tests/CallFramesTest.php:82 @@ -150,68 +150,68 @@ call_frame_9914fdd0b965fa974e826064877ece14 - -Tests\Innmind\StackTrace\CallFramesTest::staticCall() + +Tests\Innmind\StackTrace\CallFramesTest::staticCall() call_frame_9914fdd0b965fa974e826064877ece14->call_frame_7945ef788bc897e87fc2d31edd4537b5 - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/tests/CallFramesTest.php:62 + +tests/CallFramesTest.php:62 call_frame_a3479fc68cbbda8c8966caf2abecb4ec - -Tests\Innmind\StackTrace\CallFramesTest::refl() + +Tests\Innmind\StackTrace\CallFramesTest::refl() call_frame_a3479fc68cbbda8c8966caf2abecb4ec->call_frame_9914fdd0b965fa974e826064877ece14 - - + + - + -call_frame_da9f8aa8271b7ba9a2e8d52bb7f63b65 +call_frame_4bebae301b668efb03e7bc24f79606a6 - -ReflectionMethod->invoke() + +ReflectionMethod->invoke() - + -call_frame_da9f8aa8271b7ba9a2e8d52bb7f63b65->call_frame_a3479fc68cbbda8c8966caf2abecb4ec - - - +call_frame_4bebae301b668efb03e7bc24f79606a6->call_frame_a3479fc68cbbda8c8966caf2abecb4ec + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/tests/RenderTest.php:22 + +tests/RenderTest.php:24 - + -call_frame_47c0407195947f117d1878ddc407c0a3->call_frame_da9f8aa8271b7ba9a2e8d52bb7f63b65 - - - +call_frame_47c0407195947f117d1878ddc407c0a3->call_frame_4bebae301b668efb03e7bc24f79606a6 + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php:1545 + +vendor/phpunit/phpunit/src/Framework/TestCase.php:1545 @@ -219,21 +219,21 @@ call_frame_07f591f613086fa0eafe956f80ef31fa - -PHPUnit\Framework\TestCase->runTest() + +PHPUnit\Framework\TestCase->runTest() call_frame_07f591f613086fa0eafe956f80ef31fa->call_frame_47c0407195947f117d1878ddc407c0a3 - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php:1151 + +vendor/phpunit/phpunit/src/Framework/TestCase.php:1151 @@ -241,21 +241,21 @@ call_frame_5627b6f9e8560c938320b94b612d2fc0 - -PHPUnit\Framework\TestCase->runBare() + +PHPUnit\Framework\TestCase->runBare() call_frame_5627b6f9e8560c938320b94b612d2fc0->call_frame_07f591f613086fa0eafe956f80ef31fa - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestResult.php:726 + +vendor/phpunit/phpunit/src/Framework/TestResult.php:726 @@ -263,21 +263,21 @@ call_frame_9e85687edeee0a8f8bd7f473ec92cc89 - -PHPUnit\Framework\TestResult->run() + +PHPUnit\Framework\TestResult->run() call_frame_9e85687edeee0a8f8bd7f473ec92cc89->call_frame_5627b6f9e8560c938320b94b612d2fc0 - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestCase.php:903 + +vendor/phpunit/phpunit/src/Framework/TestCase.php:903 @@ -285,21 +285,21 @@ call_frame_862259868e8b30c44157d4fa168fc13a - -PHPUnit\Framework\TestCase->run() + +PHPUnit\Framework\TestCase->run() call_frame_862259868e8b30c44157d4fa168fc13a->call_frame_9e85687edeee0a8f8bd7f473ec92cc89 - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php:677 + +vendor/phpunit/phpunit/src/Framework/TestSuite.php:677 @@ -307,34 +307,34 @@ call_frame_cc4026df087e27e93e934267183b41f4 - -PHPUnit\Framework\TestSuite->run() + +PHPUnit\Framework\TestSuite->run() call_frame_cc4026df087e27e93e934267183b41f4->call_frame_862259868e8b30c44157d4fa168fc13a - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php:677 + +vendor/phpunit/phpunit/src/Framework/TestSuite.php:677 call_frame_cc4026df087e27e93e934267183b41f4->call_frame_cc4026df087e27e93e934267183b41f4 - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/Framework/TestSuite.php:677 + +vendor/phpunit/phpunit/src/Framework/TestSuite.php:677 @@ -342,21 +342,21 @@ call_frame_c8d6907ef39a015179586fa3b8c89d1a - -PHPUnit\Framework\TestSuite->run() + +PHPUnit\Framework\TestSuite->run() call_frame_c8d6907ef39a015179586fa3b8c89d1a->call_frame_cc4026df087e27e93e934267183b41f4 - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:673 + +vendor/phpunit/phpunit/src/TextUI/TestRunner.php:673 @@ -364,21 +364,21 @@ call_frame_95bacb9103a97886bc59bc9084f8765c - -PHPUnit\TextUI\TestRunner->run() + +PHPUnit\TextUI\TestRunner->run() call_frame_95bacb9103a97886bc59bc9084f8765c->call_frame_c8d6907ef39a015179586fa3b8c89d1a - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/Command.php:143 + +vendor/phpunit/phpunit/src/TextUI/Command.php:143 @@ -386,21 +386,21 @@ call_frame_ea22ce8c2ce2b0f720bfdcc70fb908c5 - -PHPUnit\TextUI\Command->run() + +PHPUnit\TextUI\Command->run() call_frame_ea22ce8c2ce2b0f720bfdcc70fb908c5->call_frame_95bacb9103a97886bc59bc9084f8765c - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/src/TextUI/Command.php:96 + +vendor/phpunit/phpunit/src/TextUI/Command.php:96 @@ -408,21 +408,21 @@ call_frame_06e435cf2f8ff07c446385801e950ee7 - -PHPUnit\TextUI\Command::main() + +PHPUnit\TextUI\Command::main() call_frame_06e435cf2f8ff07c446385801e950ee7->call_frame_ea22ce8c2ce2b0f720bfdcc70fb908c5 - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/phpunit/phpunit/phpunit:98 + +vendor/phpunit/phpunit/phpunit:98 @@ -430,21 +430,21 @@ call_frame_d8b76d2929d9dd7cd5896c117a761475 - -include() + +include() call_frame_d8b76d2929d9dd7cd5896c117a761475->call_frame_06e435cf2f8ff07c446385801e950ee7 - - - + + + - -/Users/baptouuuu/Sites/innmind/stack-trace/vendor/bin/phpunit:120 + +vendor/bin/phpunit:120 diff --git a/src/FormatPath/Truncate.php b/src/FormatPath/Truncate.php new file mode 100644 index 0000000..3541317 --- /dev/null +++ b/src/FormatPath/Truncate.php @@ -0,0 +1,43 @@ +workingDirectory = $workingDirectory; + } + + public function __invoke(Url $url, Line $line): string + { + $workingDirectory = Str::of($this->workingDirectory->path()->toString()); + /** @psalm-suppress ArgumentTypeCoercion */ + $path = Str::of($url->path()->toString()) + ->drop($workingDirectory->length()) + ->toString(); + + return "$path:{$line->toString()}"; + } + + /** + * @psalm-pure + */ + public static function of(Url $workingDirectory): self + { + return new self($workingDirectory); + } +} diff --git a/tests/RenderTest.php b/tests/RenderTest.php index 265b210..7010d22 100644 --- a/tests/RenderTest.php +++ b/tests/RenderTest.php @@ -6,16 +6,18 @@ use Innmind\StackTrace\{ Render, StackTrace, + FormatPath\Truncate, Exception\DomainException, }; use Innmind\Filesystem\File\Content; +use Innmind\Url\Url; use PHPUnit\Framework\TestCase; class RenderTest extends TestCase { public function testInvokation() { - $render = Render::of(); + $render = Render::of(null, Truncate::of(Url::of(\getcwd().'/'))); try { $refl = new \ReflectionMethod(CallFramesTest::class, 'refl');