Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setVerticalBorderChars example
TABLE;
$this
->
assertEquals
(
$expected
,
$this
->
getOutputContent
(
$output
)
)
;
}
public
function
testStyle
(
)
{
$style
=
new
TableStyle
(
)
;
$style
->
setHorizontalBorderChars
(
'.'
)
->
setVerticalBorderChars
(
'.'
)
->
setDefaultCrossingChar
(
'.'
)
;
Table::
setStyleDefinition
(
'dotfull',
$style
)
;
$table
=
new
Table
(
$output
=
$this
->
getOutputStream
(
)
)
;
$table
->
setHeaders
(
[
'Foo'
]
)
->
setRows
(
[
[
'Bar'
]
]
)
->
setStyle
(
'dotfull'
)
;
$table
->
render
(
)
;
unset
(
$this
->numberOfColumns
)
;
}
/** * @return array<string, TableStyle> */
private
static
function
initStyles
(
)
: array
{
$borderless
=
new
TableStyle
(
)
;
$borderless
->
setHorizontalBorderChars
(
'='
)
->
setVerticalBorderChars
(
' '
)
->
setDefaultCrossingChar
(
' '
)
;
$compact
=
new
TableStyle
(
)
;
$compact
->
setHorizontalBorderChars
(
''
)
->
setVerticalBorderChars
(
''
)
->
setDefaultCrossingChar
(
''
)
->
setCellRowContentFormat
(
'%s '
)
;
unset
(
$this
->numberOfColumns
)
;
}
/** * @return array<string, TableStyle> */
private
static
function
initStyles
(
)
: array
{
$borderless
=
new
TableStyle
(
)
;
$borderless
->
setHorizontalBorderChars
(
'='
)
->
setVerticalBorderChars
(
' '
)
->
setDefaultCrossingChar
(
' '
)
;
$compact
=
new
TableStyle
(
)
;
$compact
->
setHorizontalBorderChars
(
''
)
->
setVerticalBorderChars
(
''
)
->
setDefaultCrossingChar
(
''
)
->
setCellRowContentFormat
(
'%s '
)
;