Skip to content

Commit 8cd382e

Browse files
initial tests
1 parent 3052080 commit 8cd382e

File tree

6 files changed

+37
-1
lines changed

6 files changed

+37
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor

.travis.yml

Lines changed: 12 additions & 0 deletions
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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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;
Lines changed: 2 additions & 0 deletions
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

Lines changed: 18 additions & 0 deletions
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)