Skip to content

Commit 58a120d

Browse files
committed
Formatting and travis ci working
1 parent bb6c9ff commit 58a120d

File tree

8 files changed

+292
-290
lines changed

8 files changed

+292
-290
lines changed

.php_cs.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
$finder = PhpCsFixer\Finder::create()
44
->in(__DIR__.'\src')
5+
->in(__DIR__.'\tests')
56
;
67

78
return PhpCsFixer\Config::create()

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# PHPFUI\HTMLUnitTester
1+
# PHPFUI\HTMLUnitTester [![Build Status](https://travis-ci.org/phpfui/HTMLUnitTester.png?branch=master)](https://travis-ci.org/phpfui/HTMLUnitTester)
2+
23
[PHPUnit](https://phpunit.de/) Testing extensions for HMTL and CSS. **PHPFUI\HTMLUnitTester** allows you to unit test HTML and CSS for errors and warnings. Often simple errors in HTML or CSS create hard to debug issues where a simple check will reveal bad code.
34

45
This package will check detect errors and warnings in HTML and CSS in stand alone strings, files or urls.

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</testsuite>
1818
</testsuites>
1919
<php>
20-
<env name="PHPFUI\HTMLUnitTester\Extensions_url" value="http://127.0.0.1:8888"/>
21-
<env name="PHPFUI\HTMLUnitTester\Extensions_delay" value="0"/>
20+
<env name="PHPFUI\HTMLUnitTester\Extensions_url" value="http://validator.w3.org/nu/"/>
21+
<env name="PHPFUI\HTMLUnitTester\Extensions_delay" value="500000"/>
2222
</php>
2323
</phpunit>

src/PHPFUI/HTMLUnitTester/ErrorConstraint.php

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -12,54 +12,54 @@
1212
namespace PHPFUI\HTMLUnitTester;
1313

1414
class ErrorConstraint extends \PHPUnit\Framework\Constraint\Constraint
15-
{
16-
/**
17-
* Returns a string representation of the constraint.
18-
*
19-
*/
20-
public function toString() : string
21-
{
22-
return 'is valid';
23-
}
15+
{
16+
/**
17+
* Returns a string representation of the constraint.
18+
*
19+
*/
20+
public function toString() : string
21+
{
22+
return 'is valid';
23+
}
2424

25-
/**
26-
* Return additional failure description where needed.
27-
*
28-
* The function can be overridden to provide additional failure
29-
* information like a diff
30-
*
31-
* @param mixed $other Evaluated value or object.
32-
*
33-
*/
34-
protected function additionalFailureDescription($other) : string
35-
{
36-
return implode("\n", $other->getErrors());
37-
}
25+
/**
26+
* Return additional failure description where needed.
27+
*
28+
* The function can be overridden to provide additional failure
29+
* information like a diff
30+
*
31+
* @param mixed $other Evaluated value or object.
32+
*
33+
*/
34+
protected function additionalFailureDescription($other) : string
35+
{
36+
return implode("\n", $other->getErrors());
37+
}
3838

39-
/**
40-
* Returns the description of the failure.
41-
*
42-
* The beginning of failure messages is "Failed asserting that" in most
43-
* cases. This method should return the second part of that sentence.
44-
*
45-
* @param mixed $other Evaluated value or object.
46-
*
47-
*/
48-
protected function failureDescription($other) : string
49-
{
50-
return 'the markup ' . $this->toString();
51-
}
39+
/**
40+
* Returns the description of the failure.
41+
*
42+
* The beginning of failure messages is "Failed asserting that" in most
43+
* cases. This method should return the second part of that sentence.
44+
*
45+
* @param mixed $other Evaluated value or object.
46+
*
47+
*/
48+
protected function failureDescription($other) : string
49+
{
50+
return 'the markup ' . $this->toString();
51+
}
5252

53-
/**
54-
* Evaluates the constraint for parameter $other. Returns TRUE if the
55-
* constraint is met, FALSE otherwise.
56-
*
57-
* @param mixed $other Value or object to evaluate.
58-
*
59-
*/
60-
protected function matches($other) : bool
61-
{
62-
return ! $other->hasErrors();
63-
}
53+
/**
54+
* Evaluates the constraint for parameter $other. Returns TRUE if the
55+
* constraint is met, FALSE otherwise.
56+
*
57+
* @param mixed $other Value or object to evaluate.
58+
*
59+
*/
60+
protected function matches($other) : bool
61+
{
62+
return ! $other->hasErrors();
63+
}
6464

65-
}
65+
}

0 commit comments

Comments
 (0)