Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
fixed CS
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Feb 13, 2017
1 parent e3b72f7 commit a15af9c
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testCreatingUtf8Reader()
{
foreach (array('utf8', 'utf-8', 'UTF-8', 'UTF8') as $utf8) {
$reader = $this->_factory->getReaderFor($utf8);
$this->assertInstanceof($this->_prefix.'Utf8Reader', $reader);
$this->assertInstanceOf($this->_prefix.'Utf8Reader', $reader);
}
}

Expand All @@ -32,7 +32,7 @@ public function testCreatingIso8859XReaders()

foreach ($charsets as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(1, $reader->getInitialByteSize());
}
}
Expand All @@ -49,7 +49,7 @@ public function testCreatingWindows125XReaders()

foreach ($charsets as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(1, $reader->getInitialByteSize());
}
}
Expand All @@ -74,7 +74,7 @@ public function testCreatingCodePageReaders()

foreach ($charsets as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(1, $reader->getInitialByteSize());
}
}
Expand All @@ -83,7 +83,7 @@ public function testCreatingAnsiReader()
{
foreach (array('ansi', 'ANSI') as $ansi) {
$reader = $this->_factory->getReaderFor($ansi);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(1, $reader->getInitialByteSize());
}
}
Expand All @@ -92,7 +92,7 @@ public function testCreatingMacintoshReader()
{
foreach (array('macintosh', 'MACINTOSH') as $mac) {
$reader = $this->_factory->getReaderFor($mac);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(1, $reader->getInitialByteSize());
}
}
Expand All @@ -109,7 +109,7 @@ public function testCreatingKOIReaders()

foreach ($charsets as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(1, $reader->getInitialByteSize());
}
}
Expand All @@ -118,7 +118,7 @@ public function testCreatingIsciiReaders()
{
foreach (array('iscii', 'ISCII', 'viscii', 'VISCII') as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(1, $reader->getInitialByteSize());
}
}
Expand All @@ -127,7 +127,7 @@ public function testCreatingMIKReader()
{
foreach (array('mik', 'MIK') as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(1, $reader->getInitialByteSize());
}
}
Expand All @@ -136,7 +136,7 @@ public function testCreatingCorkReader()
{
foreach (array('cork', 'CORK', 't1', 'T1') as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(1, $reader->getInitialByteSize());
}
}
Expand All @@ -145,7 +145,7 @@ public function testCreatingUcs2Reader()
{
foreach (array('ucs-2', 'UCS-2', 'ucs2', 'UCS2') as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(2, $reader->getInitialByteSize());
}
}
Expand All @@ -154,7 +154,7 @@ public function testCreatingUtf16Reader()
{
foreach (array('utf-16', 'UTF-16', 'utf16', 'UTF16') as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(2, $reader->getInitialByteSize());
}
}
Expand All @@ -163,7 +163,7 @@ public function testCreatingUcs4Reader()
{
foreach (array('ucs-4', 'UCS-4', 'ucs4', 'UCS4') as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(4, $reader->getInitialByteSize());
}
}
Expand All @@ -172,7 +172,7 @@ public function testCreatingUtf32Reader()
{
foreach (array('utf-32', 'UTF-32', 'utf32', 'UTF32') as $charset) {
$reader = $this->_factory->getReaderFor($charset);
$this->assertInstanceof($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertInstanceOf($this->_prefix.'GenericFixedWidthReader', $reader);
$this->assertEquals(4, $reader->getInitialByteSize());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testTimeoutException()
$line = $this->_buffer->readLine(0);
} catch (Exception $e) {
}
$this->assertInstanceof('Swift_IoException', $e, 'IO Exception Not Thrown On Connection Timeout');
$this->assertInstanceOf('Swift_IoException', $e, 'IO Exception Not Thrown On Connection Timeout');
$this->assertRegExp('/Connection to .* Timed Out/', $e->getMessage());
}

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Swift/DependencyContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function testHasReturnsFalseForUnregisteredValue()
public function testRegisterAndLookupNewInstance()
{
$this->_container->register('one')->asNewInstanceOf('One');
$this->assertInstanceof('One', $this->_container->lookup('one'));
$this->assertInstanceOf('One', $this->_container->lookup('one'));
}

public function testHasReturnsTrueForRegisteredInstance()
Expand All @@ -61,7 +61,7 @@ public function testNewInstanceIsAlwaysNew()
public function testRegisterAndLookupSharedInstance()
{
$this->_container->register('one')->asSharedInstanceOf('One');
$this->assertInstanceof('One', $this->_container->lookup('one'));
$this->assertInstanceOf('One', $this->_container->lookup('one'));
}

public function testHasReturnsTrueForSharedInstance()
Expand Down
10 changes: 5 additions & 5 deletions tests/unit/Swift/Events/SimpleEventDispatcherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testSendEventCanBeCreated()
$transport = $this->getMockBuilder('Swift_Transport')->getMock();
$message = $this->getMockBuilder('Swift_Mime_Message')->getMock();
$evt = $this->_dispatcher->createSendEvent($transport, $message);
$this->assertInstanceof('Swift_Events_SendEvent', $evt);
$this->assertInstanceOf('Swift_Events_SendEvent', $evt);
$this->assertSame($message, $evt->getMessage());
$this->assertSame($transport, $evt->getTransport());
}
Expand All @@ -23,7 +23,7 @@ public function testCommandEventCanBeCreated()
{
$buf = $this->getMockBuilder('Swift_Transport')->getMock();
$evt = $this->_dispatcher->createCommandEvent($buf, "FOO\r\n", array(250));
$this->assertInstanceof('Swift_Events_CommandEvent', $evt);
$this->assertInstanceOf('Swift_Events_CommandEvent', $evt);
$this->assertSame($buf, $evt->getSource());
$this->assertEquals("FOO\r\n", $evt->getCommand());
$this->assertEquals(array(250), $evt->getSuccessCodes());
Expand All @@ -33,7 +33,7 @@ public function testResponseEventCanBeCreated()
{
$buf = $this->getMockBuilder('Swift_Transport')->getMock();
$evt = $this->_dispatcher->createResponseEvent($buf, "250 Ok\r\n", true);
$this->assertInstanceof('Swift_Events_ResponseEvent', $evt);
$this->assertInstanceOf('Swift_Events_ResponseEvent', $evt);
$this->assertSame($buf, $evt->getSource());
$this->assertEquals("250 Ok\r\n", $evt->getResponse());
$this->assertTrue($evt->isValid());
Expand All @@ -43,7 +43,7 @@ public function testTransportChangeEventCanBeCreated()
{
$transport = $this->getMockBuilder('Swift_Transport')->getMock();
$evt = $this->_dispatcher->createTransportChangeEvent($transport);
$this->assertInstanceof('Swift_Events_TransportChangeEvent', $evt);
$this->assertInstanceOf('Swift_Events_TransportChangeEvent', $evt);
$this->assertSame($transport, $evt->getSource());
}

Expand All @@ -52,7 +52,7 @@ public function testTransportExceptionEventCanBeCreated()
$transport = $this->getMockBuilder('Swift_Transport')->getMock();
$ex = new Swift_TransportException('');
$evt = $this->_dispatcher->createTransportExceptionEvent($transport, $ex);
$this->assertInstanceof('Swift_Events_TransportExceptionEvent', $evt);
$this->assertInstanceOf('Swift_Events_TransportExceptionEvent', $evt);
$this->assertSame($transport, $evt->getSource());
$this->assertSame($ex, $evt->getException());
}
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/Swift/Mime/SimpleHeaderFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ protected function setUp()
public function testMailboxHeaderIsCorrectType()
{
$header = $this->_factory->createMailboxHeader('X-Foo');
$this->assertInstanceof('Swift_Mime_Headers_MailboxHeader', $header);
$this->assertInstanceOf('Swift_Mime_Headers_MailboxHeader', $header);
}

public function testMailboxHeaderHasCorrectName()
Expand All @@ -32,7 +32,7 @@ public function testMailboxHeaderHasCorrectModel()
public function testDateHeaderHasCorrectType()
{
$header = $this->_factory->createDateHeader('X-Date');
$this->assertInstanceof('Swift_Mime_Headers_DateHeader', $header);
$this->assertInstanceOf('Swift_Mime_Headers_DateHeader', $header);
}

public function testDateHeaderHasCorrectName()
Expand All @@ -50,7 +50,7 @@ public function testDateHeaderHasCorrectModel()
public function testTextHeaderHasCorrectType()
{
$header = $this->_factory->createTextHeader('X-Foo');
$this->assertInstanceof('Swift_Mime_Headers_UnstructuredHeader', $header);
$this->assertInstanceOf('Swift_Mime_Headers_UnstructuredHeader', $header);
}

public function testTextHeaderHasCorrectName()
Expand All @@ -68,7 +68,7 @@ public function testTextHeaderHasCorrectModel()
public function testParameterizedHeaderHasCorrectType()
{
$header = $this->_factory->createParameterizedHeader('X-Foo');
$this->assertInstanceof('Swift_Mime_Headers_ParameterizedHeader', $header);
$this->assertInstanceOf('Swift_Mime_Headers_ParameterizedHeader', $header);
}

public function testParameterizedHeaderHasCorrectName()
Expand All @@ -94,7 +94,7 @@ public function testParameterizedHeaderHasCorrectParams()
public function testIdHeaderHasCorrectType()
{
$header = $this->_factory->createIdHeader('X-ID');
$this->assertInstanceof('Swift_Mime_Headers_IdentificationHeader', $header);
$this->assertInstanceOf('Swift_Mime_Headers_IdentificationHeader', $header);
}

public function testIdHeaderHasCorrectName()
Expand All @@ -112,7 +112,7 @@ public function testIdHeaderHasCorrectModel()
public function testPathHeaderHasCorrectType()
{
$header = $this->_factory->createPathHeader('X-Path');
$this->assertInstanceof('Swift_Mime_Headers_PathHeader', $header);
$this->assertInstanceOf('Swift_Mime_Headers_PathHeader', $header);
}

public function testPathHeaderHasCorrectName()
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Swift/Mime/SimpleHeaderSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ public function testNewInstance()
{
$set = $this->_createSet($this->_createFactory());
$instance = $set->newInstance();
$this->assertInstanceof('Swift_Mime_HeaderSet', $instance);
$this->assertInstanceOf('Swift_Mime_HeaderSet', $instance);
}

public function testToStringJoinsHeadersTogether()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Swift_StreamFilters_StringReplacementFilterFactoryTest extends \PHPUnit_Fr
public function testInstancesOfStringReplacementFilterAreCreated()
{
$factory = $this->_createFactory();
$this->assertInstanceof(
$this->assertInstanceOf(
'Swift_StreamFilters_StringReplacementFilter',
$factory->createFilter('a', 'b')
);
Expand Down

0 comments on commit a15af9c

Please sign in to comment.