Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
SchemaCreateTableEventArgs example
$otherTransport
->
expects
(
$this
->
never
(
)
)
->
method
(
$this
->
anything
(
)
)
;
$subscriber
=
new
MessengerTransportDoctrineSchemaListener
(
[
$doctrineTransport
,
$otherTransport
]
)
;
$subscriber
->
postGenerateSchema
(
$event
)
;
}
public
function
testOnSchemaCreateTable
(
)
{
$platform
=
$this
->
createMock
(
AbstractPlatform::
class
)
;
$table
=
new
Table
(
'queue_table'
)
;
$event
=
new
SchemaCreateTableEventArgs
(
$table
,
[
]
,
[
]
,
$platform
)
;
$otherTransport
=
$this
->
createMock
(
TransportInterface::
class
)
;
$otherTransport
->
expects
(
$this
->
never
(
)
)
->
method
(
$this
->
anything
(
)
)
;
$doctrineTransport
=
$this
->
createMock
(
DoctrineTransport::
class
)
;
$doctrineTransport
->
expects
(
$this
->
once
(
)
)
->
method
(
'getExtraSetupSqlForTable'
)
->
with
(
$table
)
->
willReturn
(
[
'ALTER TABLE pizza ADD COLUMN extra_cheese boolean'
]
)
;