Skip to content

Commit

Permalink
update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
genintho committed Nov 25, 2024
1 parent 7fb5e37 commit 0ac9d15
Showing 1 changed file with 34 additions and 217 deletions.
251 changes: 34 additions & 217 deletions test/snapshot/__snapshots__/classconstant.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`classconstant final 1`] = `
exports[`classconstant accept the constant name 'list' 1`] = `
Program {
"children": [
Class {
Expand All @@ -13,7 +13,7 @@ Program {
"kind": "constant",
"name": Identifier {
"kind": "identifier",
"name": "CONSTANT",
"name": "list",
},
"value": String {
"isDoubleQuote": true,
Expand All @@ -24,11 +24,11 @@ Program {
},
},
],
"final": true,
"final": false,
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "public",
"visibility": "",
},
],
"extends": null,
Expand All @@ -49,7 +49,7 @@ Program {
}
`;

exports[`classconstant multiple 1`] = `
exports[`classconstant final 1`] = `
Program {
"children": [
Class {
Expand All @@ -72,26 +72,12 @@ Program {
"value": "Hello world!",
},
},
Constant {
"kind": "constant",
"name": Identifier {
"kind": "identifier",
"name": "OTHER_CONSTANT",
},
"value": String {
"isDoubleQuote": true,
"kind": "string",
"raw": ""Other hello world!"",
"unicode": false,
"value": "Other hello world!",
},
},
],
"final": false,
"final": true,
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "",
"visibility": "public",
},
],
"extends": null,
Expand All @@ -112,7 +98,7 @@ Program {
}
`;

exports[`classconstant private 1`] = `
exports[`classconstant multiple 1`] = `
Program {
"children": [
Class {
Expand All @@ -135,12 +121,26 @@ Program {
"value": "Hello world!",
},
},
Constant {
"kind": "constant",
"name": Identifier {
"kind": "identifier",
"name": "OTHER_CONSTANT",
},
"value": String {
"isDoubleQuote": true,
"kind": "string",
"raw": ""Other hello world!"",
"unicode": false,
"value": "Other hello world!",
},
},
],
"final": false,
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "private",
"visibility": "",
},
],
"extends": null,
Expand All @@ -161,7 +161,7 @@ Program {
}
`;

exports[`classconstant protected 1`] = `
exports[`classconstant private 1`] = `
Program {
"children": [
Class {
Expand Down Expand Up @@ -189,7 +189,7 @@ Program {
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "protected",
"visibility": "private",
},
],
"extends": null,
Expand All @@ -210,7 +210,7 @@ Program {
}
`;

exports[`classconstant public 1`] = `
exports[`classconstant protected 1`] = `
Program {
"children": [
Class {
Expand Down Expand Up @@ -238,7 +238,7 @@ Program {
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "public",
"visibility": "protected",
},
],
"extends": null,
Expand All @@ -259,7 +259,7 @@ Program {
}
`;

exports[`classconstant simple 1`] = `
exports[`classconstant public 1`] = `
Program {
"children": [
Class {
Expand Down Expand Up @@ -287,7 +287,7 @@ Program {
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "",
"visibility": "public",
},
],
"extends": null,
Expand All @@ -308,7 +308,7 @@ Program {
}
`;

exports[`classconstant type hinted (supported) 1`] = `
exports[`classconstant simple 1`] = `
Program {
"children": [
Class {
Expand All @@ -321,169 +321,7 @@ Program {
"kind": "constant",
"name": Identifier {
"kind": "identifier",
"name": "CON_1",
},
"value": String {
"isDoubleQuote": true,
"kind": "string",
"raw": ""Hello world!"",
"unicode": false,
"value": "Hello world!",
},
},
],
"final": false,
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "public",
},
ClassConstant {
"attrGroups": undefined,
"constants": [
Constant {
"kind": "constant",
"name": Identifier {
"kind": "identifier",
"name": "CON_2",
},
"value": String {
"isDoubleQuote": true,
"kind": "string",
"raw": ""Hello world!"",
"unicode": false,
"value": "Hello world!",
},
},
],
"final": false,
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "",
},
ClassConstant {
"attrGroups": undefined,
"constants": [
Constant {
"kind": "constant",
"loc": TypeReference {
"kind": "typereference",
"name": "string",
"raw": "string",
},
"name": Identifier {
"kind": "identifier",
"name": "CON_3",
},
"value": String {
"isDoubleQuote": true,
"kind": "string",
"raw": ""Hello world!"",
"unicode": false,
"value": "Hello world!",
},
},
],
"final": false,
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "",
},
ClassConstant {
"attrGroups": undefined,
"constants": [
Constant {
"kind": "constant",
"loc": TypeReference {
"kind": "typereference",
"name": "string",
"raw": "string",
},
"name": Identifier {
"kind": "identifier",
"name": "CON_4",
},
"value": String {
"isDoubleQuote": true,
"kind": "string",
"raw": ""Hello world!"",
"unicode": false,
"value": "Hello world!",
},
},
],
"final": false,
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "public",
},
ClassConstant {
"attrGroups": undefined,
"constants": [
Constant {
"kind": "constant",
"loc": UnionType {
"kind": "uniontype",
"name": null,
"types": [
TypeReference {
"kind": "typereference",
"name": "string",
"raw": "string",
},
TypeReference {
"kind": "typereference",
"name": "int",
"raw": "int",
},
],
},
"name": Identifier {
"kind": "identifier",
"name": "CON_5",
},
"value": String {
"isDoubleQuote": true,
"kind": "string",
"raw": ""Hello world!"",
"unicode": false,
"value": "Hello world!",
},
},
],
"final": false,
"kind": "classconstant",
"nullable": [],
"type": null,
"visibility": "public",
},
ClassConstant {
"attrGroups": undefined,
"constants": [
Constant {
"kind": "constant",
"loc": UnionType {
"kind": "uniontype",
"name": null,
"types": [
TypeReference {
"kind": "typereference",
"name": "string",
"raw": "string",
},
TypeReference {
"kind": "typereference",
"name": "int",
"raw": "int",
},
],
},
"name": Identifier {
"kind": "identifier",
"name": "CON_6",
"name": "CONSTANT",
},
"value": String {
"isDoubleQuote": true,
Expand Down Expand Up @@ -519,9 +357,7 @@ Program {
}
`;

exports[`classconstant type hinted (unsupported) 1`] = `"Parse Error : syntax error, unexpected 'CONSTANT' (T_STRING), expecting ';' on line 1"`;

exports[`classconstant type hinted mixed position 1`] = `
exports[`classconstant type hinted (supported) 1`] = `
Program {
"children": [
Class {
Expand Down Expand Up @@ -604,27 +440,6 @@ Program {
"type": null,
"visibility": "",
},
Method {
"arguments": [],
"attrGroups": [],
"body": Block {
"children": [],
"kind": "block",
},
"byref": false,
"isAbstract": false,
"isFinal": false,
"isReadonly": false,
"isStatic": false,
"kind": "method",
"name": Identifier {
"kind": "identifier",
"name": "donut",
},
"nullable": false,
"type": null,
"visibility": "",
},
ClassConstant {
"attrGroups": undefined,
"constants": [
Expand Down Expand Up @@ -752,3 +567,5 @@ Program {
"kind": "program",
}
`;

exports[`classconstant type hinted (unsupported) 1`] = `"Parse Error: Typed Class Constants requires PHP 8.3+ on line 1"`;

0 comments on commit 0ac9d15

Please sign in to comment.