@@ -39,30 +39,36 @@ public function testSingleFileComponent(): void {
39
39
$ this ->assertSame ( '<div></div> ' , $ result );
40
40
}
41
41
42
- public function testTemplateHasOnClickHandler_RemoveHandlerFormOutput () {
42
+ public function testTemplateHasOnClickHandler_RemoveHandlerFromOutput () {
43
43
$ result = $ this ->createAndRender ( '<div v-on:click="doStuff"></div> ' , [] );
44
44
45
45
$ this ->assertSame ( '<div></div> ' , $ result );
46
46
}
47
47
48
- public function testTemplateHasOnClickHandlerAndPreventDefault_RemoveHandlerFormOutput () {
48
+ public function testTemplateHasOnClickHandlerAndPreventDefault_RemoveHandlerFromOutput () {
49
49
$ result = $ this ->createAndRender ( '<div v-on:click.prevent="doStuff"></div> ' , [] );
50
50
51
51
$ this ->assertSame ( '<div></div> ' , $ result );
52
52
}
53
53
54
- public function testTemplateHasOnClickHandlerInSomeChildNode_RemoveHandlerFormOutput () {
54
+ public function testTemplateHasOnClickHandlerInSomeChildNode_RemoveHandlerFromOutput () {
55
55
$ result = $ this ->createAndRender ( '<p><a v-on:click="doStuff"></a></p> ' , [] );
56
56
57
57
$ this ->assertSame ( '<p><a></a></p> ' , $ result );
58
58
}
59
59
60
- public function testTemplateHasOnClickHandlerInGrandChildNode_RemoveHandlerFormOutput () {
60
+ public function testTemplateHasOnClickHandlerInGrandChildNode_RemoveHandlerFromOutput () {
61
61
$ result = $ this ->createAndRender ( '<p><b><a v-on:click="doStuff"></a></b></p> ' , [] );
62
62
63
63
$ this ->assertSame ( '<p><b><a></a></b></p> ' , $ result );
64
64
}
65
65
66
+ public function testTemplateHasOnClickHandlerWithShorthand_RemoveHandlerFromOutput (): void {
67
+ $ result = $ this ->createAndRender ( '<p @click="x"></p> ' , [] );
68
+
69
+ $ this ->assertSame ( '<p></p> ' , $ result );
70
+ }
71
+
66
72
public function testTemplateHasMultipleEventHandlers_RemoveAll (): void {
67
73
$ result = $ this ->createAndRender ( '<p v-on:click="x" v-on:keypress="y"></p> ' , [] );
68
74
0 commit comments