Skip to content

Commit

Permalink
✅ Start writing unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Nov 7, 2019
1 parent 8c8559d commit 25c706d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
7 changes: 1 addition & 6 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,8 @@
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Package">
<testsuite name="Package Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>src/</directory>
</whitelist>
</filter>
</phpunit>
26 changes: 26 additions & 0 deletions tests/NotifyTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

use PHPUnit\Framework\TestCase;
use Mckenziearts\Notify\LaravelNotify;

class NotifyTest extends TestCase
{
protected $session;

protected $notify;

public function setUp() : void
{
$this->session = Mockery::spy('Mckenziearts\Notify\Storage\Session');
$this->notify = new LaravelNotify($this->session);
}

/** @test */
public function it_display_info_notify()
{
$this->notify->success('Success Notification');
$message = 'Success Notification';

$this->assertEquals('Success Notification', $message);
}
}

0 comments on commit 25c706d

Please sign in to comment.