@@ -18,8 +18,8 @@ public function basicComponentRendersStartTag()
18
18
$ tag = Basic::start ('foobar ' );
19
19
20
20
$ this ->assertRegExp ('/\<component.*\>/ ' , $ tag );
21
- $ this ->assertContains ( ' v-cloak ' , $ tag );
22
- $ this ->assertContains ( ' is="foobar" ' , $ tag );
21
+ $ this ->assertRegExp ( ' /[\s\>] v-cloak[\s\>]/ ' , $ tag );
22
+ $ this ->assertRegExp ( ' /[\s\>] is="foobar"[\s\>]/ ' , $ tag );
23
23
}
24
24
25
25
/**
@@ -30,9 +30,9 @@ public function inlineComponentRendersStartTag()
30
30
$ tag = Inline::start ('foobar ' );
31
31
32
32
$ this ->assertRegExp ('/\<component.*\>/ ' , $ tag );
33
- $ this ->assertContains ( ' inline-template ' , $ tag );
34
- $ this ->assertContains ( ' v-cloak ' , $ tag );
35
- $ this ->assertContains ( ' is="foobar" ' , $ tag );
33
+ $ this ->assertRegExp ( ' /[\s\>] inline-template[\s\>]/ ' , $ tag );
34
+ $ this ->assertRegExp ( ' /[\s\>] v-cloak[\s\>]/ ' , $ tag );
35
+ $ this ->assertRegExp ( ' /[\s\>] is="foobar"[\s\>]/ ' , $ tag );
36
36
}
37
37
38
38
/**
@@ -100,8 +100,8 @@ public function componentWithBooleanArgumentsRendersStartTag()
100
100
{
101
101
$ tag = Basic::start ('foobar ' , ['foo ' => true , 'baz ' => false ]);
102
102
103
- $ this ->assertContains ( ' :foo="true" ' , $ tag );
104
- $ this ->assertContains ( ' :baz="false" ' , $ tag );
103
+ $ this ->assertRegExp ( ' /[\s\>] :foo="true"[\s\>]/ ' , $ tag );
104
+ $ this ->assertRegExp ( ' /[\s\>] :baz="false"[\s\>]/ ' , $ tag );
105
105
}
106
106
107
107
/**
@@ -111,8 +111,8 @@ public function componentWithScalarArgumentsRendersStartTag()
111
111
{
112
112
$ tag = Basic::start ('foobar ' , ['foo ' => 'bar ' , 'baz ' => 123 ]);
113
113
114
- $ this ->assertContains ( ' foo="bar" ' , $ tag );
115
- $ this ->assertContains ( ' :baz="123" ' , $ tag );
114
+ $ this ->assertRegExp ( ' /[\s\>] foo="bar"[\s\>]/ ' , $ tag );
115
+ $ this ->assertRegExp ( ' /[\s\>] :baz="123"[\s\>]/ ' , $ tag );
116
116
}
117
117
118
118
/**
@@ -129,8 +129,8 @@ public function componentWithArrayOrObjectArgumentsRendersStartTag()
129
129
]
130
130
);
131
131
132
- $ this ->assertContains ( ' :foo="[1,2,3]" ' , $ tag );
133
- $ this ->assertContains ( ' :bar="{"foo":"bar"}" ' , $ tag );
134
- $ this ->assertContains ( ' :baz="{"baz":"qux"}" ' , $ tag );
132
+ $ this ->assertRegExp ( ' /[\s\>] :foo="\ [1,2,3\]"[\s\>]/ ' , $ tag );
133
+ $ this ->assertRegExp ( ' /[\s\>] :bar="{"foo":"bar"}"[\s\>]/ ' , $ tag );
134
+ $ this ->assertRegExp ( ' /[\s\>] :baz="{"baz":"qux"}"[\s\>]/ ' , $ tag );
135
135
}
136
136
}
0 commit comments