Skip to content

Commit c21ede2

Browse files
committed
Merge branch '2.x'
# Conflicts: # composer.json
2 parents 70f038a + 146b8b4 commit c21ede2

18 files changed

+58
-47
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/vendor
2-
composer.lock
2+
composer.lock
3+
.phpunit.result.cache

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Tom Irons
3+
Copyright (c) 2017 Tom Irons
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tomirons/tuxedo",
3-
"description": "Simple transactional email classes/templates for Laravel mailables",
3+
"description": "Simple transactional email classes/templates for Laravel 5.4 mailables",
44
"license": "MIT",
55
"authors": [
66
{
@@ -9,14 +9,14 @@
99
}
1010
],
1111
"require": {
12-
"php": ">=7.0",
13-
"illuminate/database": "5.5.*",
14-
"illuminate/mail": "5.5.*",
15-
"illuminate/support": "5.5.*"
12+
"php": "^7.3",
13+
"illuminate/database": "^6.0|^7.0|^8.0",
14+
"illuminate/mail": "^6.0|^7.0|^8.0",
15+
"illuminate/support": "^6.0|^7.0|^8.0"
1616
},
1717
"require-dev": {
18-
"mockery/mockery": "~0.9.4",
19-
"phpunit/phpunit": "~5.7"
18+
"mockery/mockery": "^1.4",
19+
"phpunit/phpunit": "^9.2"
2020
},
2121
"autoload": {
2222
"psr-4": {
@@ -25,7 +25,7 @@
2525
},
2626
"extra": {
2727
"branch-alias": {
28-
"dev-master": "2.0-dev"
28+
"dev-master": "2.x-dev"
2929
},
3030
"laravel": {
3131
"providers": [

phpunit.xml.dist

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,16 @@
77
convertNoticesToExceptions="true"
88
convertWarningsToExceptions="true"
99
processIsolation="false"
10-
stopOnError="false"
1110
stopOnFailure="false"
12-
syntaxCheck="true"
13-
verbose="true"
1411
>
12+
<coverage>
13+
<include>
14+
<directory suffix=".php">src/</directory>
15+
</include>
16+
</coverage>
1517
<testsuites>
16-
<testsuite name="Tuxedo Test Suite">
17-
<directory suffix="Test.php">./tests</directory>
18+
<testsuite name="Unit">
19+
<directory suffix="Test.php">./tests/Unit</directory>
1820
</testsuite>
1921
</testsuites>
20-
<filter>
21-
<whitelist>
22-
<directory suffix=".php">src/</directory>
23-
</whitelist>
24-
</filter>
2522
</phpunit>

resources/views/html/alert/box.blade.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
<td class="alert-content alert-{{ $type }}">
44
<table width="100%" cellpadding="0" cellspacing="0">
55
<tr>
6-
<td class="alert-item">
7-
{{ Illuminate\Mail\Markdown::parse($slot) }}
8-
</td>
6+
<td class="alert-item">{{ Illuminate\Mail\Markdown::parse($slot) }}</td>
97
</tr>
108
</table>
119
</td>

resources/views/html/invoice/table.blade.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<td>
44
<h3>{{ $data['id'] }}</h3></td>
55
<td>
6-
<h3 class="align-right">{{ $data['date'] }}</h3></td>
6+
<h3 class="align-right">{{ $data['date'] }}</h3>
7+
</td>
78
</tr>
89
<tr>
910
<td colspan="2">
@@ -53,4 +54,4 @@
5354
</table>
5455
</td>
5556
</tr>
56-
</table>
57+
</table>

resources/views/markdown/alert/box.blade.php

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
foo

src/Mailables/ActionMailable.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22

33
namespace TomIrons\Tuxedo\Mailables;
44

5-
use TomIrons\Tuxedo\Message;
65
use TomIrons\Tuxedo\Traits\HasAction;
76
use TomIrons\Tuxedo\Traits\HasLine;
87
use TomIrons\Tuxedo\TuxedoMessage;
98

109
class ActionMailable extends TuxedoMessage
1110
{
12-
use HasAction,
13-
HasLine;
11+
use HasAction;
12+
use HasLine;
1413

1514
/**
1615
* The Markdown template for the message (if applicable).

src/Mailables/AlertMailable.php

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

33
namespace TomIrons\Tuxedo\Mailables;
44

5-
use TomIrons\Tuxedo\Message;
65
use TomIrons\Tuxedo\Traits\HasLine;
76
use TomIrons\Tuxedo\TuxedoMessage;
87

src/Mailables/InvoiceMailable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

1010
class InvoiceMailable extends TuxedoMessage
1111
{
12-
use HasAction,
13-
HasLine;
12+
use HasAction;
13+
use HasLine;
1414

1515
/**
1616
* The Markdown template for the message (if applicable).

src/TuxedoMessage.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66

77
class TuxedoMessage extends Mailable
88
{
9+
/**
10+
* The theme for the mailable.
11+
*
12+
* @var string
13+
*/
14+
public $theme = 'tuxedo';
15+
916
/**
1017
* The message's greeting.
1118
*

src/TuxedoServiceProvider.php

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace TomIrons\Tuxedo;
44

5-
use Illuminate\Mail\Markdown;
65
use Illuminate\Support\ServiceProvider;
76

87
class TuxedoServiceProvider extends ServiceProvider
@@ -16,13 +15,21 @@ public function boot()
1615
{
1716
$this->loadViewsFrom(__DIR__.'/../resources/views', 'tuxedo');
1817

18+
$this->alterConfiguration();
19+
}
20+
21+
/**
22+
* Register the service provider.
23+
*
24+
* @return void
25+
*/
26+
public function register()
27+
{
1928
if ($this->app->runningInConsole()) {
2029
$this->publishes([
21-
__DIR__.'/../resources/views' => resource_path('views/vendor/tuxedo'),
22-
], 'tuxedo');
30+
__DIR__.'/../resources/views' => $this->app->resourcePath('views/vendor/tuxedo'),
31+
], 'tuxedo-mail');
2332
}
24-
25-
$this->alterConfiguration();
2633
}
2734

2835
/**
@@ -32,7 +39,6 @@ public function boot()
3239
*/
3340
public function alterConfiguration()
3441
{
35-
config()->set('mail.markdown.theme', 'tuxedo');
3642
config()->set('mail.markdown.paths', array_merge([__DIR__.'/../resources/views'], config('mail.markdown.paths')));
3743
}
3844
}

tests/ActionMailableTest.php renamed to tests/Unit/ActionMailableTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<?php
22

3-
namespace Tests;
3+
namespace Tests\Unit;
44

5+
use PHPUnit\Framework\TestCase;
56
use TomIrons\Tuxedo\Mailables\ActionMailable;
67

7-
class ActionMailableTest extends \PHPUnit_Framework_TestCase
8+
class ActionMailableTest extends TestCase
89
{
910
protected $mailable;
1011

11-
public function setUp()
12+
public function setUp(): void
1213
{
1314
parent::setUp();
1415

tests/AlertMailableTest.php renamed to tests/Unit/AlertMailableTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<?php
22

3-
namespace Tests;
3+
namespace Tests\Unit;
44

5+
use PHPUnit\Framework\TestCase;
56
use TomIrons\Tuxedo\Mailables\AlertMailable;
67

7-
class AlertMailableTest extends \PHPUnit_Framework_TestCase
8+
class AlertMailableTest extends TestCase
89
{
910
protected $mailable;
1011

11-
public function setUp()
12+
public function setUp(): void
1213
{
1314
parent::setUp();
1415

tests/InvoiceMailableTest.php renamed to tests/Unit/InvoiceMailableTest.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<?php
22

3-
namespace Tests;
3+
namespace Tests\Unit;
44

5+
use PHPUnit\Framework\TestCase;
56
use TomIrons\Tuxedo\Mailables\InvoiceMailable;
67

7-
class InvoiceMailableTest extends \PHPUnit_Framework_TestCase
8+
class InvoiceMailableTest extends TestCase
89
{
910
protected $mailable;
1011

11-
public function setUp()
12+
public function setUp(): void
1213
{
1314
parent::setUp();
1415

0 commit comments

Comments
 (0)