composer-update-patch

This commit is contained in:
Manish Verma
2016-11-03 05:44:29 +05:30
parent 2dca47f5a4
commit 5d49d384a0
5118 changed files with 51603 additions and 122575 deletions

View File

@@ -15,7 +15,7 @@ class BaseOptionedModel extends Units\Test
{
public function testMethods()
{
$this->if($object = new Message('Test', array('param' => 'test')))
$this->if($object = new Message('Test', ['param' => 'test']))
->boolean($object->hasOption('param'))
->isTrue()
->string($object->getOption('param'))
@@ -28,7 +28,7 @@ class BaseOptionedModel extends Units\Test
->string($object->getOption('renotExist', '12345'))
->isEqualTo('12345')
->when($object->setOptions(array('chuck' => 'norris')))
->when($object->setOptions(['chuck' => 'norris']))
->boolean($object->hasOption('chuck'))
->isTrue()
->string($object->getOption('chuck'))

View File

@@ -15,7 +15,7 @@ class BaseParameteredModel extends Units\Test
{
public function testMethods()
{
$this->if($object = new Device('Test', array('param' => 'test')))
$this->if($object = new Device('Test', ['param' => 'test']))
->boolean($object->hasParameter('param'))
->isTrue()
->string($object->getParameter('param'))
@@ -28,7 +28,7 @@ class BaseParameteredModel extends Units\Test
->string($object->getParameter('renotExist', '12345'))
->isEqualTo('12345')
->when($object->setParameters(array('chuck' => 'norris')))
->when($object->setParameters(['chuck' => 'norris']))
->boolean($object->hasParameter('chuck'))
->isTrue()
->string($object->getParameter('chuck'))

View File

@@ -20,7 +20,7 @@ class Device extends Units\Test
->array($object->getParameters())->isEmpty()
;
$this->if($object = new TestedModel('t0k3n', array('param' => 'test')))
$this->if($object = new TestedModel('t0k3n', ['param' => 'test']))
->string($object->getToken())->isEqualTo('t0k3n')
->when($object->setToken('t0k3ns3tt3d'))
->string($object->getToken())->isEqualTo('t0k3ns3tt3d')

View File

@@ -20,7 +20,7 @@ class Message extends Units\Test
->array($object->getOptions())->isEmpty()
;
$this->if($object = new TestedModel('Test', array('param' => 'test')))
$this->if($object = new TestedModel('Test', ['param' => 'test']))
->string($object->getText())->isEqualTo('Test')
->when($object->setText('Test 2'))
->string($object->getText())->isEqualTo('Test 2')

View File

@@ -43,10 +43,10 @@ class Push extends Units\Test
{
$this->if($this->mockClass('\Sly\NotificationPusher\Adapter\AdapterInterface', '\Mock'))
->and($adapter = new \Mock\AdapterInterface())
->and($devices = new BaseDeviceCollection(array(new BaseDevice('Token1'), new BaseDevice('Token2'), new BaseDevice('Token3'))))
->and($devices = new BaseDeviceCollection([new BaseDevice('Token1'), new BaseDevice('Token2'), new BaseDevice('Token3')]))
->and($message = new BaseMessage('Test'))
->and($object = new TestedModel($adapter, $devices, $message, array('param' => 'test')))
->and($object = new TestedModel($adapter, $devices, $message, ['param' => 'test']))
->object($object->getDevices())
->isInstanceOf('\Sly\NotificationPusher\Collection\DeviceCollection')
@@ -64,7 +64,7 @@ class Push extends Units\Test
{
$this->if($this->mockClass('\Sly\NotificationPusher\Adapter\AdapterInterface', '\Mock'))
->and($adapter = new \Mock\AdapterInterface())
->and($devices = new BaseDeviceCollection(array(new BaseDevice('Token1'), new BaseDevice('Token2'), new BaseDevice('Token3'))))
->and($devices = new BaseDeviceCollection([new BaseDevice('Token1'), new BaseDevice('Token2'), new BaseDevice('Token3')]))
->and($message = new BaseMessage('Test'))
->and($object = new TestedModel($adapter, $devices, $message))
@@ -136,7 +136,7 @@ class Push extends Units\Test
->isInstanceOf('\Sly\NotificationPusher\Adapter\Apns')
->when($object->setAdapter($gcmAdapter))
->and($object->setDevices(new BaseDeviceCollection(array(new BaseDevice(self::GCM_TOKEN_EXAMPLE)))))
->and($object->setDevices(new BaseDeviceCollection([new BaseDevice(self::GCM_TOKEN_EXAMPLE)])))
->object($object->getAdapter())
->isInstanceOf('\Sly\NotificationPusher\Adapter\Gcm')
;
@@ -146,7 +146,7 @@ class Push extends Units\Test
{
$this->if($this->mockClass('\Sly\NotificationPusher\Adapter\AdapterInterface', '\Mock'))
->and($adapter = new \Mock\AdapterInterface())
->and($devices = new BaseDeviceCollection(array(new BaseDevice('Token1'), new BaseDevice('Token2'), new BaseDevice('Token3'))))
->and($devices = new BaseDeviceCollection([new BaseDevice('Token1'), new BaseDevice('Token2'), new BaseDevice('Token3')]))
->and($message = new BaseMessage('Test'))
->and($object = new TestedModel($adapter, $devices, $message))