9
9
class TestComponent
10
10
{
11
11
/**
12
- * The original component.
13
- *
14
- * @var \Illuminate\View\Component
15
- */
12
+ * The original component.
13
+ *
14
+ * @var \Illuminate\View\Component
15
+ */
16
16
public $ component ;
17
17
18
18
/**
19
- * The rendered component contents.
20
- *
21
- * @var string
22
- */
19
+ * The rendered component contents.
20
+ *
21
+ * @var string
22
+ */
23
23
protected $ rendered ;
24
24
25
25
/**
26
- * Create a new test component instance.
27
- *
28
- * @param \Illuminate\View\Component $component
29
- * @param \Illuminate\View\View $view
30
- * @return void
31
- */
26
+ * Create a new test component instance.
27
+ *
28
+ * @param \Illuminate\View\Component $component
29
+ * @param \Illuminate\View\View $view
30
+ * @return void
31
+ */
32
32
public function __construct ($ component , $ view )
33
33
{
34
34
$ this ->component = $ component ;
@@ -37,12 +37,12 @@ public function __construct($component, $view)
37
37
}
38
38
39
39
/**
40
- * Assert that the given string is contained within the rendered component.
41
- *
42
- * @param string $value
43
- * @param bool $escape
44
- * @return $this
45
- */
40
+ * Assert that the given string is contained within the rendered component.
41
+ *
42
+ * @param string $value
43
+ * @param bool $escape
44
+ * @return $this
45
+ */
46
46
public function assertSee ($ value , $ escape = true )
47
47
{
48
48
$ value = $ escape ? e ($ value ) : $ value ;
@@ -53,12 +53,12 @@ public function assertSee($value, $escape = true)
53
53
}
54
54
55
55
/**
56
- * Assert that the given strings are contained in order within the rendered component.
57
- *
58
- * @param array $values
59
- * @param bool $escape
60
- * @return $this
61
- */
56
+ * Assert that the given strings are contained in order within the rendered component.
57
+ *
58
+ * @param array $values
59
+ * @param bool $escape
60
+ * @return $this
61
+ */
62
62
public function assertSeeInOrder (array $ values , $ escape = true )
63
63
{
64
64
$ values = $ escape ? array_map ('e ' , ($ values )) : $ values ;
@@ -69,12 +69,12 @@ public function assertSeeInOrder(array $values, $escape = true)
69
69
}
70
70
71
71
/**
72
- * Assert that the given string is contained within the rendered component text.
73
- *
74
- * @param string $value
75
- * @param bool $escape
76
- * @return $this
77
- */
72
+ * Assert that the given string is contained within the rendered component text.
73
+ *
74
+ * @param string $value
75
+ * @param bool $escape
76
+ * @return $this
77
+ */
78
78
public function assertSeeText ($ value , $ escape = true )
79
79
{
80
80
$ value = $ escape ? e ($ value ) : $ value ;
@@ -85,12 +85,12 @@ public function assertSeeText($value, $escape = true)
85
85
}
86
86
87
87
/**
88
- * Assert that the given strings are contained in order within the rendered component text.
89
- *
90
- * @param array $values
91
- * @param bool $escape
92
- * @return $this
93
- */
88
+ * Assert that the given strings are contained in order within the rendered component text.
89
+ *
90
+ * @param array $values
91
+ * @param bool $escape
92
+ * @return $this
93
+ */
94
94
public function assertSeeTextInOrder (array $ values , $ escape = true )
95
95
{
96
96
$ values = $ escape ? array_map ('e ' , ($ values )) : $ values ;
@@ -101,12 +101,12 @@ public function assertSeeTextInOrder(array $values, $escape = true)
101
101
}
102
102
103
103
/**
104
- * Assert that the given string is not contained within the rendered component.
105
- *
106
- * @param string $value
107
- * @param bool $escape
108
- * @return $this
109
- */
104
+ * Assert that the given string is not contained within the rendered component.
105
+ *
106
+ * @param string $value
107
+ * @param bool $escape
108
+ * @return $this
109
+ */
110
110
public function assertDontSee ($ value , $ escape = true )
111
111
{
112
112
$ value = $ escape ? e ($ value ) : $ value ;
@@ -117,12 +117,12 @@ public function assertDontSee($value, $escape = true)
117
117
}
118
118
119
119
/**
120
- * Assert that the given string is not contained within the rendered component text.
121
- *
122
- * @param string $value
123
- * @param bool $escape
124
- * @return $this
125
- */
120
+ * Assert that the given string is not contained within the rendered component text.
121
+ *
122
+ * @param string $value
123
+ * @param bool $escape
124
+ * @return $this
125
+ */
126
126
public function assertDontSeeText ($ value , $ escape = true )
127
127
{
128
128
$ value = $ escape ? e ($ value ) : $ value ;
@@ -133,10 +133,10 @@ public function assertDontSeeText($value, $escape = true)
133
133
}
134
134
135
135
/**
136
- * Get the string contents of the rendered component.
137
- *
138
- * @return string
139
- */
136
+ * Get the string contents of the rendered component.
137
+ *
138
+ * @return string
139
+ */
140
140
public function __toString ()
141
141
{
142
142
return $ this ->rendered ;
0 commit comments