Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F10843558
BrokerFactoryTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
BrokerFactoryTest.php
View Options
<?php
namespace
Keruald\Broker\Tests
;
use
Keruald\Broker\BrokerFactory
;
class
BrokerFactoryTest
extends
TestCase
{
public
function
testValidParameters
()
{
$broker
=
BrokerFactory
::
make
([
'driver'
=>
'blackhole'
]);
$this
->
assertInstanceOf
(
'Keruald
\B
roker
\B
lackholeBroker'
,
$broker
);
$broker
=
BrokerFactory
::
make
([
'driver'
=>
'amqp'
]);
$this
->
assertInstanceOf
(
'Keruald
\B
roker
\A
MQPBroker'
,
$broker
);
}
public
function
testOmnipotenceBlackhole
()
{
$broker
=
BrokerFactory
::
make
([
'driver'
=>
'blackhole'
,
'omnipotence'
=>
true
,
]);
$broker
->
spreadLove
();
// a method not in Broker abstract class
}
/**
* @expectedException InvalidArgumentException
*/
public
function
testEmptyParameters
()
{
BrokerFactory
::
make
([]);
}
/**
* @expectedException InvalidArgumentException
*/
public
function
testInvalidParameters
()
{
BrokerFactory
::
make
([
'foo'
=>
'bar'
]);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Jul 31, 13:39 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2846852
Default Alt Text
BrokerFactoryTest.php (1 KB)
Attached To
Mode
rKBROKER Keruald Broker
Attached
Detach File
Event Timeline
Log In to Comment