Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing #4

Merged
merged 5 commits into from
Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,24 @@ language: php
services:
- mysql
php:
- 5.6
- 7
env:
matrix:
- CORE_BRANCH=master DB=sqlite
- CORE_BRANCH=master DB=mysql
- CORE_BRANCH=stable11 DB=sqlite
- CORE_BRANCH=stable11 DB=mysql

before_install:
# install core
- cd ../
- git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH
- mv deck server/apps/deck

before_script:
# fill owncloud with default configs and enable deck
- cd server
- mkdir data
- ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- bash ./before_install.sh deck $CORE_BRANCH $DB
- cd ../server
- ./occ app:enable deck
- ./occ app:check-code deck
- php -S localhost:8080 &

before_script:
- cd apps/deck

script:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Deck

[![Build Status](https://travis-ci.org/juliushaertl/deck.svg?token=6auunhHMRyx7p3n8fzxZ&branch=master)](https://travis-ci.org/juliushaertl/deck) [![CodeCov](https://codecov.io/github/juliushaertl/deck/coverage.svg?branch=master)](https://codecov.io/github/juliushaertl/deck) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/juliushaertl/deck/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/juliushaertl/deck/?branch=master) [![GitHub license](https://img.shields.io/badge/license-AGPLv3-blue.svg)](https://raw.githubusercontent.com/juliushaertl/deck/master/LICENSE)
[![Build Status](https://travis-ci.org/juliushaertl/deck.svg?branch=master)](https://travis-ci.org/juliushaertl/deck) [![CodeCov](https://codecov.io/github/juliushaertl/deck/coverage.svg?branch=master)](https://codecov.io/github/juliushaertl/deck) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/juliushaertl/deck/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/juliushaertl/deck/?branch=master) [![GitHub license](https://img.shields.io/badge/license-AGPLv3-blue.svg)](https://raw.githubusercontent.com/juliushaertl/deck/master/LICENSE)

Deck is a kanban style project and personal management tool integrated with Nextcloud.

Expand Down
2 changes: 1 addition & 1 deletion lib/Db/Acl.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

namespace OCA\Deck\Db;

class Acl extends Entity implements \JsonSerializable {
class Acl extends RelationalEntity implements \JsonSerializable {

const PERMISSION_READ = 0;
const PERMISSION_EDIT = 1;
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/Board.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

use JsonSerializable;

class Board extends Entity implements JsonSerializable {
class Board extends RelationalEntity implements JsonSerializable {

public $id;
protected $title;
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

use JsonSerializable;

class Card extends Entity implements JsonSerializable {
class Card extends RelationalEntity implements JsonSerializable {

public $id;
protected $title;
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/CardMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function update(Entity $entity) {

/**
* @param $id
* @return Entity if not found
* @return RelationalEntity if not found
*/
public function find($id) {
$sql = 'SELECT * FROM `*PREFIX*deck_cards` ' .
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/Label.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

use JsonSerializable;

class Label extends Entity implements JsonSerializable {
class Label extends RelationalEntity implements JsonSerializable {

public $id;
protected $title;
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/Entity.php → lib/Db/RelationalEntity.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
namespace OCA\Deck\Db;


class Entity extends \OCP\AppFramework\Db\Entity {
class RelationalEntity extends \OCP\AppFramework\Db\Entity {

private $_relations = array();

Expand Down
2 changes: 1 addition & 1 deletion lib/Db/Stack.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use JsonSerializable;


class Stack extends Entity implements JsonSerializable {
class Stack extends RelationalEntity implements JsonSerializable {

public $id;
protected $title;
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/StackMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function __construct(IDBConnection $db, CardMapper $cardMapper) {

/**
* @param $id
* @return Entity if not found
* @return \OCP\AppFramework\Db\Entity if not found
*/
public function find($id) {
$sql = 'SELECT * FROM `*PREFIX*deck_stacks` ' .
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Db/EntityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
class EntityTest extends \PHPUnit_Framework_TestCase {

public function testRelation() {
$entity = new Entity();
$entity = new RelationalEntity();
$entity->foo = null;
$entity->addRelation('foo');
$entity->setFoo('test');
$this->assertEquals([], $entity->getUpdatedFields());
}

public function testWithoutRelation() {
$entity = new Entity();
$entity = new RelationalEntity();
$entity->foo = null;
$entity->setFoo('test');
$this->assertEquals(['foo'=>true], $entity->getUpdatedFields());
Expand Down