Skip to content

Commit

Permalink
Upgrading Composer packages, updates README and adds CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Mar 22, 2018
1 parent 9b46306 commit ba1a9fc
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 22 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# .travis.yml - configuration file for the travis continuous integration service
# see http://about.travis-ci.org/docs/user/languages/php for more hints
#
language: php

# PHP versions to test against.
# See: http://docs.travis-ci.com/user/languages/php/
php:
- 5.6
- 7.1

install:
- composer install
script:
- python -mjson.tool composer.json
after_install:
- composer show
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,36 @@
PHPUnit wrapper for Drupal 7
============================

Hacked up version
### Status

Build status: ![National-Theatre/drupal-phpunit build status](https://api.travis-ci.org/National-Theatre/drupal-phpunit.svg?branch=master)

### Prerequisites

- Composer

### Installation

Include this package in your `composer.json` file as:

{
"require": {
"NT/drupal-phpunit": "dev-master"
},
"repositories": [
{
"type": "git",
"url": "https://github.com/National-Theatre/drupal-phpunit.git"
}
],
}

### Usage

To use this package in your tests, you need to extend your classes using `DrupalTestCase` class, for example:

use NT\Drupal\Testing\PHPUnit\DrupalTestCase;

class MyOwnTest extends DrupalTestCase {
// Methods here.
}
42 changes: 21 additions & 21 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"name": "NT/drupal-phpunit",
"description": "A library to integrate PHPUnit with Drupal",
"keywords": ["testing", "phpunit", "drupal"],
"type": "library",
"authors": [
"description": "A library to integrate PHPUnit with Drupal 7",
"keywords": ["testing", "phpunit", "drupal"],
"type": "library",
"authors": [
{
"name": "Royal National Theatre",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.3.3",
"phpunit/phpunit": ">=3.7.1@stable",
"behat/behat": ">=2.4@stable",
"behat/mink": ">=1.4@stable",
"behat/mink-extension": "*"
],
"require": {
"php": ">=5.6",
"phpunit/phpunit": ">=6.5@stable",
"behat/behat": ">=2.4@stable",
"behat/mink": ">=1.4@stable",
"behat/mink-extension": "*"
},
"autoload": {
"psr-0": {
"NT\\Drupal\\Testing": "src"
},
"autoload": {
"psr-0": {
"NT\\Drupal\\Testing": "src"
},
"classmap": [
"src/NT/Drupal/Testing/PHPUnit/",
"src/NT/Drupal/Testing/Fixtures/"
]
}
}
"classmap": [
"src/NT/Drupal/Testing/PHPUnit/",
"src/NT/Drupal/Testing/Fixtures/"
]
}
}

0 comments on commit ba1a9fc

Please sign in to comment.