Skip to content

Commit a9e8d06

Browse files
committed
tests initial
1 parent 5aea638 commit a9e8d06

File tree

6 files changed

+97
-20
lines changed

6 files changed

+97
-20
lines changed

.editorconfig

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,35 @@
1-
# For more information about the properties used in this file,
2-
# please see the EditorConfig documentation:
3-
# http://editorconfig.org
1+
# For more information about the properties used in
2+
# this file, please see the EditorConfig documentation:
3+
# http://editorconfig.org/
4+
5+
root = true
46

57
[*]
68
charset = utf-8
79
end_of_line = lf
810
indent_size = 4
9-
indent_style = space
11+
indent_style = tab
1012
insert_final_newline = true
1113
trim_trailing_whitespace = true
1214

13-
[{*.yml,package.json}]
15+
# Docs say 80 ideally, 100 ok, no more than 120
16+
# http://doc.silverstripe.org/en/getting_started/coding_conventions/
17+
max_line_length = 100
18+
19+
[*.md]
20+
trim_trailing_whitespace = false
21+
22+
[*.yml]
1423
indent_size = 2
24+
indent_style = space
1525

16-
# The indent size used in the package.json file cannot be changed:
26+
#PSR 2
27+
[**.php]
28+
indent_style = space
29+
indent_size = 4
30+
31+
[{.travis.yml,package.json}]
32+
# The indent size used in the `package.json` file cannot be changed
1733
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
34+
indent_size = 2
35+
indent_style = space

.gitattributes

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/tests export-ignore
2-
/docs export-ignore
3-
/.gitattributes export-ignore
4-
/.gitignore export-ignore
5-
/phpunit.xml export-ignore
1+
/tests export-ignore
2+
/docs export-ignore
3+
/.travis.yml export-ignore
4+
/.scrutinizer.yml export-ignore
5+
/phpunit.xml export-ignore

.scrutinizer.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,5 @@ coding_style:
2222
general:
2323
use_tabs: false
2424

25-
checks:
26-
php:
27-
code_rating: true
28-
duplication: true
29-
3025
filter:
31-
paths: [tests/*,code/*]
26+
paths: [tests/*,code/*]

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ addons:
77
packages:
88
- tidy
99

10-
php:
11-
- 7.0
12-
1310
before_install:
1411
- pip install --user codecov
1512

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
# viewable-dataobject
2+
[![Build Status](https://travis-ci.org/dynamic/viewable-dataobject.svg?branch=master)](https://travis-ci.org/dynamic/viewable-dataobject)
3+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/dynamic/viewable-dataobject/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/dynamic/viewable-dataobject/?branch=master)
4+
[![Code Coverage](https://scrutinizer-ci.com/g/dynamic/viewable-dataobject/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/dynamic/viewable-dataobject/?branch=master)
5+
[![codecov](https://codecov.io/gh/dynamic/viewable-dataobject/branch/master/graph/badge.svg)](https://codecov.io/gh/dynamic/viewable-dataobject)
6+
7+
[![Latest Stable Version](https://poser.pugx.org/dynamic/viewable-dataobject/version)](https://packagist.org/packages/dynamic/viewable-dataobject)
8+
[![Latest Unstable Version](https://poser.pugx.org/dynamic/viewable-dataobject/v/unstable)](//packagist.org/packages/dynamic/viewable-dataobject)
9+
[![Total Downloads](https://poser.pugx.org/dynamic/viewable-dataobject/downloads)](https://packagist.org/packages/dynamic/viewable-dataobject)
10+
[![License](https://poser.pugx.org/dynamic/viewable-dataobject/license)](https://packagist.org/packages/dynamic/viewable-dataobject)
11+
[![Monthly Downloads](https://poser.pugx.org/dynamic/viewable-dataobject/d/monthly)](https://packagist.org/packages/dynamic/viewable-dataobject)
12+
[![Daily Downloads](https://poser.pugx.org/dynamic/viewable-dataobject/d/daily)](https://packagist.org/packages/dynamic/viewable-dataobject)
213

314
DataExtension that easily allows a dataobject to be viewed like a Page
415

tests/ViewableDataObjectTest.php

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
3+
class ViewableDataObjectTest extends SapphireTest {
4+
public function testUpdateCMSFields() {
5+
$this->markTestSkipped('TODO');
6+
}
7+
8+
public function testHasParentPage() {
9+
$this->markTestSkipped('TODO');
10+
}
11+
12+
public function testHasViewAction() {
13+
$this->markTestSkipped('TODO');
14+
}
15+
16+
public function testGetLink() {
17+
$this->markTestSkipped('TODO');
18+
}
19+
20+
public function testLink() {
21+
$this->markTestSkipped('TODO');
22+
}
23+
24+
public function testGetAbsoluteLink() {
25+
$this->markTestSkipped('TODO');
26+
}
27+
28+
public function testValidURLSegment() {
29+
$this->markTestSkipped('TODO');
30+
}
31+
32+
public function testFunction() {
33+
$this->markTestSkipped('TODO');
34+
}
35+
36+
public function testGenerateURLSegment() {
37+
$this->markTestSkipped('TODO');
38+
}
39+
40+
public function testGetStageURLSegment() {
41+
$this->markTestSkipped('TODO');
42+
}
43+
44+
public function testGetLiveURLSegment() {
45+
$this->markTestSkipped('TODO');
46+
}
47+
48+
public function testBreadcrumbs() {
49+
$this->markTestSkipped('TODO');
50+
}
51+
52+
public function testOnBeforeWrite() {
53+
$this->markTestSkipped('TODO');
54+
}
55+
56+
}

0 commit comments

Comments
 (0)