Skip to content

Commit 79e187e

Browse files
committed
Add a test and travis config
1 parent 825629b commit 79e187e

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.travis.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
sudo: false
2+
language: php
3+
4+
php:
5+
- 5.6
6+
7+
env:
8+
- MONGO_VERSION=stable
9+
10+
matrix:
11+
include:
12+
- php: 7.1
13+
env: ADAPTER_VERSION="^1.0.0" MONGODB_VERSION=stable
14+
15+
services: mongodb
16+
17+
before_script:
18+
- if [ "x${MONGO_VERSION}" != "x" ]; then yes '' | pecl -q install -f mongo-${MONGO_VERSION}; fi
19+
- if [ "x${MONGODB_VERSION}" != "x" ]; then pecl install -f mongodb-${MONGODB_VERSION}; fi
20+
- if [ "x${ADAPTER_VERSION}" != "x" ]; then composer require "alcaeus/mongo-php-adapter=${ADAPTER_VERSION}" --ignore-platform-reqs; fi
21+
- composer self-update
22+
- composer install --dev
23+
24+
script:
25+
- ./vendor/bin/phpunit
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace AntiMattr\Bundle\MongoDBMigrationsBundle\Command;
4+
5+
use PHPUnit\Framework\TestCase;
6+
7+
/**
8+
* @author Douglas Reith <douglas@reith.com.au>
9+
*/
10+
class MigrationsExecuteCommandTest extends TestCase
11+
{
12+
public static function testCommandIsEnabled()
13+
{
14+
$command = new MigrationsExecuteCommand();
15+
self::assertTrue($command->isEnabled());
16+
}
17+
}

phpunit.xml.dist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit colors="true">
3+
<testsuites>
4+
<testsuite name="Doesntmattr MongoDB Migrations Bundle Tests">
5+
<directory>./Tests/</directory>
6+
</testsuite>
7+
</testsuites>
8+
</phpunit>

0 commit comments

Comments
 (0)