Skip to content

Commit ee1a568

Browse files
author
jmosul
committed
feat: upgrade to composer 2 and add phpunit
1 parent 695901f commit ee1a568

4 files changed

Lines changed: 32 additions & 2 deletions

File tree

Dockerfile.composer

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ RUN apk add --no-cache libpng libpng-dev && docker-php-ext-install gd && apk del
66

77
RUN docker-php-ext-install pcntl
88

9-
COPY --from=composer:1.6 /usr/bin/composer /usr/bin/composer
9+
COPY --from=composer:2.0 /usr/bin/composer /usr/bin/composer
1010

11-
RUN /usr/bin/composer global require hirak/prestissimo
11+
RUN composer --version
1212

1313
COPY composer.json /opt
14+

composer.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
"DesignMyNight\\Mongodb\\": "src"
2424
}
2525
},
26+
"autoload-dev": {
27+
"psr-4": {
28+
"Tests\\": "tests"
29+
}
30+
},
2631
"authors": [
2732
{
2833
"name": "DesignMyNight",
@@ -36,5 +41,8 @@
3641
"DesignMyNight\\Mongodb\\MongodbPassportServiceProvider"
3742
]
3843
}
44+
},
45+
"require-dev": {
46+
"phpunit/phpunit": "^7.5"
3947
}
4048
}

tests/RunnerTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?php
2+
3+
namespace Tests;
4+
5+
class RunnerTest extends TestCase
6+
{
7+
public function testsPhpUnitRuns()
8+
{
9+
$this->assertTrue(true);
10+
}
11+
}

tests/TestCase.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
namespace Tests;
4+
5+
use PHPUnit\Framework\TestCase as BaseTestCase;
6+
7+
class TestCase extends BaseTestCase
8+
{
9+
10+
}

0 commit comments

Comments
 (0)