mirror of
https://github.com/silverstripe/silverstripe-versionfeed
synced 2024-10-22 11:05:31 +02:00
Travis support
This commit is contained in:
parent
2d035a6e94
commit
13bb2cf270
28
.travis.yml
Normal file
28
.travis.yml
Normal file
@ -0,0 +1,28 @@
|
||||
# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details
|
||||
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.3
|
||||
|
||||
env:
|
||||
matrix:
|
||||
- DB=MYSQL CORE_RELEASE=3.1
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- php: 5.3
|
||||
env: DB=PGSQL CORE_RELEASE=3.1
|
||||
- php: 5.4
|
||||
env: DB=MYSQL CORE_RELEASE=master
|
||||
- php: 5.5
|
||||
env: DB=MYSQL CORE_RELEASE=master
|
||||
|
||||
before_script:
|
||||
- phpenv rehash
|
||||
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
|
||||
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
|
||||
- cd ~/builds/ss
|
||||
|
||||
script:
|
||||
- phpunit versionfeed/tests/
|
@ -1,5 +1,7 @@
|
||||
# Version Feed
|
||||
|
||||
[![Build Status](https://secure.travis-ci.org/silverstripe-labs/silverstripe-versionfeed.png)](http://travis-ci.org/silverstripe-labs/silverstripe-versionfeed)
|
||||
|
||||
## Overview
|
||||
|
||||
The module creates an RSS feed on each page with their change history, as well as one for the entire site.
|
||||
|
@ -1,6 +1,17 @@
|
||||
<?php
|
||||
class VersionFeedTest extends SapphireTest {
|
||||
|
||||
protected $usesDatabase = true;
|
||||
|
||||
protected $requiredExtensions = array(
|
||||
'SiteTree' => array('VersionFeed'),
|
||||
'ContentController' => array('VersionFeed_Controller'),
|
||||
);
|
||||
|
||||
protected $illegalExtensions = array(
|
||||
'SiteTree' => array('Translatable')
|
||||
);
|
||||
|
||||
public function testDiffedChangesExcludesRestrictedItems() {
|
||||
$this->markTestIncomplete();
|
||||
}
|
||||
@ -13,9 +24,7 @@ class VersionFeedTest extends SapphireTest {
|
||||
$page = new Page(array('Title' => 'My Title'));
|
||||
$page->write();
|
||||
$page->publish('Stage', 'Live');
|
||||
$feed = new VersionFeed();
|
||||
$feed->setOwner($page);
|
||||
|
||||
|
||||
$page->Title = 'My Changed Title';
|
||||
$page->write();
|
||||
$page->publish('Stage', 'Live');
|
||||
@ -25,13 +34,13 @@ class VersionFeedTest extends SapphireTest {
|
||||
|
||||
$this->assertContains(
|
||||
_t('RSSHistory.TITLECHANGED', 'Title has changed:') . 'My Changed Title',
|
||||
array_map('strip_tags', $feed->getDiffedChanges()->column('DiffTitle')),
|
||||
array_map('strip_tags', $page->getDiffedChanges()->column('DiffTitle')),
|
||||
'Detects published title changes'
|
||||
);
|
||||
|
||||
$this->assertNotContains(
|
||||
_t('RSSHistory.TITLECHANGED', 'Title has changed:') . 'My Unpublished Changed Title',
|
||||
array_map('strip_tags', $feed->getDiffedChanges()->column('DiffTitle')),
|
||||
array_map('strip_tags', $page->getDiffedChanges()->column('DiffTitle')),
|
||||
'Ignores unpublished title changes'
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user