Skip to content

Commit b9ef1ff

Browse files
authored
Merge pull request #13 from PolishSymfonyCommunity/php-update
Update dependencies
2 parents 111537c + 9b521fe commit b9ef1ff

File tree

6 files changed

+23
-19
lines changed

6 files changed

+23
-19
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.phpunit.result.cache
12
phpunit.xml
23
vendor
34
composer.lock

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
language: php
22

33
php:
4-
- 5.3
5-
- 5.4
4+
- 7.2
5+
- 7.3
6+
- 7.4
67

7-
before_script:
8-
- wget -nc http://getcomposer.org/composer.phar
9-
- php composer.phar install
8+
install:
9+
- composer install
1010

11-
script: phpunit --coverage-text
11+
script:
12+
- ./vendor/bin/phpunit --coverage-text
1213

1314
notifications:
1415
email:

composer.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,14 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=5.3.2",
20-
"symfony/dependency-injection": ">=2.0.0",
21-
"mockery/mockery": ">=0.7.0"
19+
"php": "^7.2",
20+
"symfony/dependency-injection": "^5.0",
21+
"mockery/mockery": "^1.3"
22+
},
23+
"require-dev": {
24+
"phpunit/phpunit": "^8.4"
2225
},
2326
"autoload": {
24-
"psr-0": { "PSS\\SymfonyMockerContainer": "src/" }
27+
"psr-4": { "PSS\\SymfonyMockerContainer\\": "src/" }
2528
}
2629
}

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44

55
<testsuites>
66
<testsuite name="SymfonyMockerContainer test suite">
7-
<directory suffix="Test.php">./src/PSS/SymfonyMockerContainer/Tests</directory>
7+
<directory suffix="Test.php">./tests</directory>
88
</testsuite>
99
</testsuites>
1010

1111
<filter>
1212
<whitelist>
1313
<directory>./src</directory>
1414
<exclude>
15-
<directory>./src/PSS/SymfonyMockerContainer/Tests</directory>
15+
<directory>./tests</directory>
1616
<directory>./vendor</directory>
1717
</exclude>
1818
</whitelist>

src/PSS/SymfonyMockerContainer/DependencyInjection/MockerContainer.php renamed to src/DependencyInjection/MockerContainer.php

File renamed without changes.

src/PSS/SymfonyMockerContainer/Tests/DependencyInjection/MockerContainerTest.php renamed to tests/DependencyInjection/MockerContainerTest.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
namespace PSS\SymfonyMockerContainer\Tests\DependencyInjection;
44

55
use PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer;
6+
use PHPUnit\Framework\TestCase;
67

7-
class MockerContainerTest extends \PHPUnit_Framework_TestCase
8+
class MockerContainerTest extends TestCase
89
{
910
/**
1011
* @var \PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer $container
@@ -16,7 +17,7 @@ class MockerContainerTest extends \PHPUnit_Framework_TestCase
1617
*/
1718
private $services = array();
1819

19-
public function setUp()
20+
public function setUp(): void
2021
{
2122
$this->container = new MockerContainer();
2223
$this->services = array('test.service_1' => null, 'test.service_2' => null, 'test.service_3' => null);
@@ -34,7 +35,7 @@ public function setUp()
3435
* As the mocks are never cleared during the execution
3536
* we have to do it manually.
3637
*/
37-
public function tearDown()
38+
public function tearDown(): void
3839
{
3940
$reflection = new \ReflectionClass('PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer');
4041
$property = $reflection->getProperty('mockedServices');
@@ -61,12 +62,10 @@ public function testThatServiceCanBeMocked()
6162
$this->assertSame($mock, $this->container->get('test.service_1'));
6263
}
6364

64-
/**
65-
* @expectedException \InvalidArgumentException
66-
* @expectedExceptionMessage Cannot mock a non-existent service: "test.new_service"
67-
*/
6865
public function testThatServiceCannotBeMockedIfItDoesNotExist()
6966
{
67+
$this->expectException(\InvalidArgumentException::class);
68+
$this->expectExceptionMessage('Cannot mock a non-existent service: "test.new_service"');
7069
$this->container->mock('test.new_service', 'stdClass');
7170
}
7271

0 commit comments

Comments
 (0)