Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2bccf71

Browse files
Tweaked the tests
1 parent 64cf5b7 commit 2bccf71

15 files changed

Lines changed: 16 additions & 51 deletions

tests/Database/DatabaseConnectionFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function testMakeCallsCreateConnectionForReadWrite()
4040
$config = array(
4141
'read' => array('database' => 'database'),
4242
'write' => array('database' => 'database'),
43-
'driver' => 'mysql', 'prefix' => 'prefix', 'name' => 'foo'
43+
'driver' => 'mysql', 'prefix' => 'prefix', 'name' => 'foo',
4444
);
4545
$expect = $config;
4646
unset($expect['read']);

tests/Database/DatabaseEloquentMorphToManyTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
use Mockery as m;
4-
use Illuminate\Database\Eloquent\Collection;
54
use Illuminate\Database\Eloquent\Relations\MorphToMany;
65

76
class DatabaseEloquentMorphToManyTest extends PHPUnit_Framework_TestCase {

tests/Database/DatabaseSQLiteSchemaGrammarTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ public function testAddingTimeStamps()
374374
$this->assertEquals(2, count($statements));
375375
$expected = array(
376376
'alter table "users" add column "created_at" datetime not null',
377-
'alter table "users" add column "updated_at" datetime not null'
377+
'alter table "users" add column "updated_at" datetime not null',
378378
);
379379
$this->assertEquals($expected, $statements);
380380
}

tests/Foundation/FoundationApplicationTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
use Mockery as m;
4-
use Illuminate\Http\Request;
54
use Illuminate\Foundation\Application;
65

76
class FoundationApplicationTest extends PHPUnit_Framework_TestCase {

tests/Http/HttpRequestTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function segmentProvider()
5858
array('', 1, 'default'),
5959
array('foo/bar//baz', '1', 'foo'),
6060
array('foo/bar//baz', '2', 'bar'),
61-
array('foo/bar//baz', '3', 'baz')
61+
array('foo/bar//baz', '3', 'baz'),
6262
);
6363
}
6464

@@ -81,7 +81,7 @@ public function segmentsProvider()
8181
array('', array()),
8282
array('foo/bar', array('foo', 'bar')),
8383
array('foo/bar//baz', array('foo', 'bar', 'baz')),
84-
array('foo/0/bar', array('foo', '0', 'bar'))
84+
array('foo/0/bar', array('foo', '0', 'bar')),
8585
);
8686
}
8787

tests/Pagination/PaginationPaginatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ public function testGetUrlHasPriorityOverAppends()
196196

197197
$p->appends(array(
198198
'sort' => 'desc',
199-
'page' => '2'
199+
'page' => '2',
200200
));
201201
$this->assertEquals('http://foo.com?sort=desc&page=1', $p->getUrl(1));
202202
}

tests/Queue/QueueIronQueueTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function testPushProperlyPushesJobOntoIronWithClosures()
4141
$closure = new Illuminate\Support\SerializableClosure($innerClosure = function() use ($name) { return $name; });
4242
$crypt->shouldReceive('encrypt')->once()->with(serialize($closure))->andReturn('serial_closure');
4343
$crypt->shouldReceive('encrypt')->once()->with(json_encode(array(
44-
'job' => 'IlluminateQueueClosure', 'data' => array('closure' => 'serial_closure'), 'attempts' => 1, 'queue' => 'default'
44+
'job' => 'IlluminateQueueClosure', 'data' => array('closure' => 'serial_closure'), 'attempts' => 1, 'queue' => 'default',
4545
)))->andReturn('encrypted');
4646
$iron->shouldReceive('postMessage')->once()->with('default', 'encrypted', array())->andReturn((object) array('id' => 1));
4747
$queue->push($innerClosure);

tests/Queue/QueueSqsJobTest.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
<?php
22

33
use Mockery as m;
4-
54
use Aws\Sqs\SqsClient;
6-
use Aws\Common\Credentials\Credentials;
7-
use Aws\Common\Credentials\CredentialsInterface;
8-
use Aws\Common\Signature\SignatureInterface;
9-
use Aws\Common\Signature\SignatureV4;
10-
115
use Guzzle\Common\Collection;
12-
use Guzzle\Service\Resource\Model;
6+
use Aws\Common\Signature\SignatureV4;
7+
use Aws\Common\Credentials\Credentials;
138

149
class QueueSqsJobTest extends PHPUnit_Framework_TestCase {
1510

@@ -51,6 +46,7 @@ public function setUp() {
5146

5247
}
5348

49+
5450
public function tearDown()
5551
{
5652
m::close();
@@ -76,6 +72,7 @@ public function testDeleteRemovesTheJobFromSqs()
7672
$job->delete();
7773
}
7874

75+
7976
protected function getJob()
8077
{
8178
return new Illuminate\Queue\Jobs\SqsJob(

tests/Queue/QueueSqsQueueTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ public function testPushProperlyPushesJobOntoSqs()
9090
$id = $queue->push($this->mockedJob, $this->mockedData, $this->queueName);
9191
$this->assertEquals($this->mockedMessageId, $id);
9292
}
93+
9394
}

tests/Session/SessionStoreTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ public function getMocks()
294294
return array(
295295
$this->getSessionName(),
296296
m::mock('SessionHandlerInterface'),
297-
$this->getSessionId()
297+
$this->getSessionId(),
298298
);
299299
}
300300

0 commit comments

Comments
 (0)