Skip to content

Commit

Permalink
Add phpunit tool.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bill Li authored and Bill Li committed Jan 24, 2018
1 parent bd0d967 commit a848655
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@
"require": {
"php": ">=7.1",
"guzzlehttp/guzzle": "^6.2",
"nicmart/string-template": "~0.1"
"nicmart/string-template": "~0.1",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~6.0"
},
"autoload": {
"psr-4": {
"AnomalyLab\\LuminousSMS\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"AnomalyLab\\LuminousSMS\\Tests\\": "tests/"
}
}
}
22 changes: 22 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
</phpunit>
19 changes: 19 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

use AnomalyLab\LuminousSMS\Tests;

use Mockery;
use PHPUnit\Framework\TestCase as PHPUnitTestCase;

class TestCase extends PHPUnitTestCase
{
public function setUp()
{
Mockery::globalHelpers();
}

public function tearDown()
{
Mockery::close();
}
}

0 comments on commit a848655

Please sign in to comment.