Skip to content

Commit a6c1c98

Browse files
author
Andrew Scott
authored
Merge pull request #28 from open-source-contributions/test_improvement
Test improvement
2 parents fceece2 + ac757d3 commit a6c1c98

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ composer.phar
33
phpunit.xml
44
vendor/
55
build/
6+
.phpunit.result.cache

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010
fast_finish: true
1111

1212
before_script:
13-
- composer install --dev --prefer-source
13+
- composer install --prefer-source
1414

15-
script: ./vendor/bin/phpunit --coverage-text
15+
script: ./vendor/bin/phpunit --coverage-text

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<phpunit bootstrap="vendor/autoload.php"
33
colors="true">
44
<testsuites>
5-
<testsuite>
5+
<testsuite name="php-dom-wrapper testsuite">
66
<directory>tests</directory>
77
</testsuite>
88
</testsuites>
@@ -20,4 +20,4 @@
2020
<directory suffix=".php">src</directory>
2121
</whitelist>
2222
</filter>
23-
</phpunit>
23+
</phpunit>

tests/Node/DocumentTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function testDocumentSetHtmlEncoding() {
1616
public function testDocumentParent() {
1717
$doc = $this->document('<html></html>');
1818

19-
$this->assertSame(null, $doc->parent());
19+
$this->assertNull($doc->parent());
2020
}
2121

2222
public function testDocumentParents() {
@@ -35,6 +35,6 @@ public function testDocumentClone() {
3535
$doc = $this->document('<html></html>');
3636
$clone = $doc->_clone();
3737

38-
$this->assertSame(null, $clone);
38+
$this->assertNull($clone);
3939
}
40-
}
40+
}

tests/Traversal/EqTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testEq() {
2626
$this->assertInstanceOf('\DOMNode', $nodes->eq(3));
2727
$this->assertSame('div', $nodes->eq(3)->nodeName);
2828

29-
$this->assertSame(null, $nodes->eq(4));
29+
$this->assertNull($nodes->eq(4));
3030

3131
$this->assertInstanceOf('\DOMNode', $nodes->eq(-1));
3232
$this->assertSame('div', $nodes->eq(-1)->nodeName);
@@ -41,6 +41,6 @@ public function testEq() {
4141
$this->assertSame('div', $nodes->eq(-4)->nodeName);
4242
$this->assertSame('example', $nodes->eq(-4)->attr('class'));
4343

44-
$this->assertSame(null, $nodes->eq(-5));
44+
$this->assertNull($nodes->eq(-5));
4545
}
46-
}
46+
}

0 commit comments

Comments
 (0)