From 0ad0391cb0d383a23e2611e42ceadb67173f673d Mon Sep 17 00:00:00 2001 From: Manish Verma Date: Mon, 13 Aug 2018 14:15:16 +0530 Subject: [PATCH] Added sample test case for travis --- .gitignore | 1 + app/Http/Controllers/Common/PhpMailController.php | 2 +- phpunit.xml | 3 +-- tests/ExampleTest.php | 4 +--- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 70a7cc7f5..42d6013f7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Please try and keep this file organized by alphabetical order. Single files first, then directories. .env +.phpunit.result.cache Homestead.yaml Homestead.json /config/lfm.php diff --git a/app/Http/Controllers/Common/PhpMailController.php b/app/Http/Controllers/Common/PhpMailController.php index 03b93387e..c08ff5773 100644 --- a/app/Http/Controllers/Common/PhpMailController.php +++ b/app/Http/Controllers/Common/PhpMailController.php @@ -242,7 +242,7 @@ class PhpMailController extends Controller } // $mail->addBCC($bc); - $size = count($attach); + $size = ($attach) ? count($attach) : 0; if ($size > 0) { for ($i = 0; $i < $size; $i++) { if (is_array($attach) && array_key_exists($i, $attach)) { diff --git a/phpunit.xml b/phpunit.xml index d66acd014..7040158d9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,8 +7,7 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="false" - syntaxCheck="false"> + stopOnFailure="false"> ./tests/ diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php index 258e5ff21..7f0b2a70d 100644 --- a/tests/ExampleTest.php +++ b/tests/ExampleTest.php @@ -9,8 +9,6 @@ class ExampleTest extends TestCase */ public function testBasicExample() { - // $response = $this->call('GET', '/'); - - // $this->assertEquals(200, $response->getStatusCode()); + $this->assertEquals(1, 55-54); } }