Skip to content

Commit 0144be7

Browse files
committed
Merge pull request #12 from rubenCodeforges/tests
add Tests
2 parents f81435f + 8cd382e commit 0144be7

File tree

6 files changed

+37
-1
lines changed

6 files changed

+37
-1
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor

.travis.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
language: php
2+
php:
3+
- 5.3
4+
- 5.4
5+
- 5.5
6+
before_script:
7+
- composer self-update
8+
- composer install --dev --prefer-source
9+
script: ./vendor/bin/phpunit -c lib/ --coverage-text
10+
notifications:
11+
email:
12+

composer.json

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
"require": {
2222
"php": ">=5.3.3"
2323
},
24+
"require-dev": {
25+
"phpunit/phpunit": "4.2.*@dev"
26+
},
2427
"autoload": {
2528
"psr-0": {
2629
"SmtpValidatorEmail": "lib/"

lib/SmtpValidatorEmail/Smtp/Smtp.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public function send($cmd)
402402
// did the send work?
403403
if ($result === false) {
404404
throw new ExceptionSendFailed('Send failed ' .
405-
'on: ' . $this->host);
405+
'on: ' . $this->host );
406406
}
407407

408408
return $result;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
require_once dirname(__FILE__).'/../../../vendor/autoload.php';

lib/phpunit.xml.dist

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<phpunit bootstrap="./SmtpValidatorEmail/Tests/bootstrap.php" colors="true">
2+
3+
<testsuites>
4+
<testsuite name="SmtpValidatorEmail test suite">
5+
<directory suffix="Test.php">./SmtpValidatorEmail</directory>
6+
</testsuite>
7+
</testsuites>
8+
9+
<filter>
10+
<whitelist>
11+
<directory>./</directory>
12+
<exclude>
13+
<directory>../vendor/</directory>
14+
<directory>./SmtpValidatorEmail/Tests</directory>
15+
</exclude>
16+
</whitelist>
17+
</filter>
18+
</phpunit>

0 commit comments

Comments
 (0)