Skip to content

Commit 72f91b0

Browse files
committed
Merge branch 'develop' into release/1.0.0
2 parents f96e02d + edf5401 commit 72f91b0

7 files changed

+20
-51
lines changed

.travis.yml

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
language: php
22

33
php:
4-
- 5.5.9
5-
- 5.5
6-
- 5.6
7-
- 7.0
84
- 7.1
5+
- 7.2
96

107
env:
118
global:
129
- setup=basic
1310

1411
matrix:
1512
include:
16-
- php: 7.0
17-
env: setup=lowest
18-
- php: 7.0
19-
env: setup=stable
2013
- php: 7.1
2114
env: setup=lowest
2215
- php: 7.1
2316
env: setup=stable
17+
- php: 7.2
18+
env: setup=lowest
19+
- php: 7.2
20+
env: setup=stable
2421

2522
sudo: false
2623

composer.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
"phayes/geophp": "~1.2"
2727
},
2828
"require-dev": {
29-
"mockery/mockery": "^0.9.1",
30-
"phpunit/phpunit": "~4.0|~5.0",
29+
"mockery/mockery": "^1",
30+
"phpunit/phpunit": "~7.0",
3131
"psy/psysh": "^0.5.1",
32-
"satooshi/php-coveralls": "^0.6.1|^1",
33-
"symfony/var-dumper": "~2.7|~3.0"
32+
"satooshi/php-coveralls": "^1",
33+
"symfony/thanks": "^1.0",
34+
"symfony/var-dumper": "~3.0"
3435
},
3536
"autoload": {
3637
"psr-4": {

phpunit.xml.dist

+1-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
verbose="true">
2323

2424
<testsuites>
25-
<testsuite name="Garbage Man Test Suite">
25+
<testsuite name="Geometry Suite">
2626
<directory>./tests/</directory>
2727
</testsuite>
2828
</testsuites>
@@ -41,10 +41,6 @@
4141
</whitelist>
4242
</filter>
4343

44-
<listeners>
45-
<listener class="\Mockery\Adapter\Phpunit\TestListener"></listener>
46-
</listeners>
47-
4844
<logging>
4945
<log type="coverage-html"
5046
target="./build/coverage"

tests/GeometryFacadeTest.php

-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ private function setUpMocks()
2828

2929
/**
3030
* @test
31-
* @group unit
3231
*/
3332
public function it_can_be_constructed()
3433
{
@@ -37,7 +36,6 @@ public function it_can_be_constructed()
3736

3837
/**
3938
* @test
40-
* @group
4139
*/
4240
public function it_returns_the_correct_aliase_for_the_facade()
4341
{

tests/GeometryServiceProviderTest.php

+3-6
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,15 @@ private function setUpMocks()
7171
}
7272

7373
/**
74-
* @tests
75-
* @group unit
74+
* @test
7675
*/
7776
public function it_can_be_constructed()
7877
{
7978
$this->assertInstanceOf(GeometryServiceProvider::class, $this->service_provider);
8079
}
8180

8281
/**
83-
* @tests
84-
* @group unit
82+
* @test
8583
*/
8684
public function it_registers_the_geometry_mock()
8785
{
@@ -113,8 +111,7 @@ public function it_registers_the_geometry_mock()
113111
}
114112

115113
/**
116-
* @tests
117-
* @group unit
114+
* @test
118115
*/
119116
public function it_boots_the_service()
120117
{

tests/GeometryTest.php

-13
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ protected function setUpMocks()
4949

5050
/**
5151
* @test
52-
* @group unit
5352
*/
5453
public function it_can_be_constructed()
5554
{
@@ -58,7 +57,6 @@ public function it_can_be_constructed()
5857

5958
/**
6059
* @test
61-
* @group unit
6260
*/
6361
public function it_calls_load_on_geoPHP_with_the_correct_type_for_the_dynamic_parse_methods()
6462
{
@@ -98,7 +96,6 @@ public function it_calls_load_on_geoPHP_with_the_correct_type_for_the_dynamic_pa
9896

9997
/**
10098
* @test
101-
* @group unit
10299
*/
103100
public function it_parses_data_without_a_type()
104101
{
@@ -118,7 +115,6 @@ public function it_parses_data_without_a_type()
118115

119116
/**
120117
* @test
121-
* @group unit
122118
*/
123119
public function it_uses_laravel_to_resolve_classes_if_was_provided()
124120
{
@@ -157,7 +153,6 @@ public function it_uses_laravel_to_resolve_classes_if_was_provided()
157153

158154
/**
159155
* @test
160-
* @group unit
161156
*/
162157
public function it_returns_the_wrapped_linestring_class_for_geoPHPs_linestring()
163158
{
@@ -181,7 +176,6 @@ public function it_returns_the_wrapped_linestring_class_for_geoPHPs_linestring()
181176

182177
/**
183178
* @test
184-
* @group unit
185179
*/
186180
public function it_returns_the_wrapped_multilinestring_class_for_geoPHPs_multilinestring()
187181
{
@@ -205,7 +199,6 @@ public function it_returns_the_wrapped_multilinestring_class_for_geoPHPs_multili
205199

206200
/**
207201
* @test
208-
* @group unit
209202
*/
210203
public function it_returns_the_wrapped_multipoint_class_for_geoPHPs_multipoint()
211204
{
@@ -229,7 +222,6 @@ public function it_returns_the_wrapped_multipoint_class_for_geoPHPs_multipoint()
229222

230223
/**
231224
* @test
232-
* @group unit
233225
*/
234226
public function it_returns_the_wrapped_multipolygon_class_for_geoPHPs_multipolygon()
235227
{
@@ -253,7 +245,6 @@ public function it_returns_the_wrapped_multipolygon_class_for_geoPHPs_multipolyg
253245

254246
/**
255247
* @test
256-
* @group unit
257248
*/
258249
public function it_returns_the_wrapped_polygon_class_for_geoPHPs_polygon()
259250
{
@@ -277,7 +268,6 @@ public function it_returns_the_wrapped_polygon_class_for_geoPHPs_polygon()
277268

278269
/**
279270
* @test
280-
* @group unit
281271
*/
282272
public function it_returns_the_wrapped_point_class_for_geoPHPs_point()
283273
{
@@ -312,7 +302,6 @@ public function it_raises_exception_for_undefined_method()
312302

313303
/**
314304
* @test
315-
* @group unit
316305
* @expectedException InvalidArgumentException
317306
*/
318307
public function it_raises_exception_when_the_data_cannot_be_converted()
@@ -335,7 +324,6 @@ public function it_raises_exception_when_the_data_cannot_be_converted()
335324

336325
/**
337326
* @test
338-
* @group unit
339327
* @expectedException InvalidArgumentException
340328
*/
341329
public function it_raises_exception_when_building_name_to_proxy_class_for_null_geometry()
@@ -345,7 +333,6 @@ public function it_raises_exception_when_building_name_to_proxy_class_for_null_g
345333

346334
/**
347335
* @test
348-
* @group unit
349336
* @expectedException RuntimeException
350337
*/
351338
public function it_raises_exception_when_building_name_to_proxy_class_that_does_not_exist()

tests/TestCase.php

+6-13
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,26 @@
55
use ArrayAccess;
66
use Countable;
77
use Iterator;
8-
use Mockery;
8+
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
99
use Mockery\MockInterface;
10-
use PHPUnit_Framework_TestCase;
10+
use PHPUnit\Framework\TestCase as PHPUnitTestCase;
1111

1212
/**
1313
* Class TestCase
1414
*
1515
* @package Tests\Spinen\BrowserFilter
1616
*/
17-
abstract class TestCase extends PHPUnit_Framework_TestCase
17+
abstract class TestCase extends PHPUnitTestCase
1818
{
19-
public function tearDown()
20-
{
21-
if (class_exists('Mockery')) {
22-
Mockery::close();
23-
}
24-
25-
parent::tearDown();
26-
}
19+
use MockeryPHPUnitIntegration;
2720

2821
/**
2922
* Helper to allow mocking of iterator classes.
3023
*
3124
* @link https://gist.github.com/VladaHejda/8299871
3225
*
3326
* @param MockInterface $mock
34-
* @param array $items
27+
* @param array $items
3528
*
3629
* @return void
3730
*/
@@ -80,7 +73,7 @@ protected function mockArrayIterator(MockInterface $mock, array $items)
8073

8174
$mock->shouldReceive('next')
8275
->andReturnUsing(function () use (& $counter) {
83-
++ $counter;
76+
++$counter;
8477
});
8578
}
8679

0 commit comments

Comments
 (0)