summaryrefslogtreecommitdiff
path: root/features/correct_window_setup.feature
blob: e9be2562a4bb9c33ec8fd9e0bec9d53188985e4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Feature: Correct window setup
    In order to use Vdebug with all window panels
    As a user
    I want to see correct watch, stack and status information

    Scenario: The status window
        Given I have a file example.php containing
            """
            <?php
            $var1 = 1;
            ?>
            """
        When I start the debugger with the PHP script example.php
        Then the status should be break
        And the status window should contain :9000

    Scenario: The watch window
        Given I have a file example.php containing
            """
            <?php
            $var1 = 1;
            $var2 = array("hello", "world");
            ?>
            """
        And I start the debugger with the PHP script example.php
        When I step over
        Then the watch window should show $var1
        And the watch window should show $var2
        And the watch window variable $var1 should be (int) 1
        And the watch window variable $var2 should be (uninitialized)

    Scenario: The stack window
        Given I have a file example.php containing
            """
            <?php
            $var1 = 1;
            $var2 = array("hello", "world");
            ?>
            """
        And I start the debugger with the PHP script example.php
        When I step over
        Then the first item on the stack should show the file example.php
        And the first item on the stack should show line 3

    Scenario: Reading the stack window with multiple files
        Given I have a file example.php containing
            """
            <?php
            include "example2.php";
            ?>
            """
        And I have a file example2.php containing
            """
            <?php
            $var1 = 1;
            $var2 = array("hello", "world");
            ?>
            """
        And I start the debugger with the PHP script example.php
        When I step in
        Then item 1 on the stack should show the file example2.php
        And item 1 on the stack should show line 2
        And item 2 on the stack should show the file example.php
        And item 2 on the stack should show line 2