Code clean up.

This commit is contained in:
James Cole
2017-11-15 11:33:07 +01:00
parent ef837f20dd
commit 57dcdfa0c4
60 changed files with 398 additions and 347 deletions

View File

@@ -50,16 +50,15 @@ class DescriptionStartsTest extends TestCase
/**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
*/
public function testTriggeredNot()
public function testTriggeredClose()
{
$journal = new TransactionJournal;
$journal->description = 'Lorem IPSUM blabla';
$trigger = DescriptionStarts::makeFromStrings('blabla', false);
$journal->description = 'Something is going to happen';
$trigger = DescriptionStarts::makeFromStrings('omething', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
*/
@@ -75,11 +74,11 @@ class DescriptionStartsTest extends TestCase
/**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
*/
public function testTriggeredClose()
public function testTriggeredLongSearch()
{
$journal = new TransactionJournal;
$journal->description = 'Something is going to happen';
$trigger = DescriptionStarts::makeFromStrings('omething', false);
$journal->description = 'Something';
$trigger = DescriptionStarts::makeFromStrings('Something is', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
@@ -87,11 +86,11 @@ class DescriptionStartsTest extends TestCase
/**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
*/
public function testTriggeredLongSearch()
public function testTriggeredNot()
{
$journal = new TransactionJournal;
$journal->description = 'Something';
$trigger = DescriptionStarts::makeFromStrings('Something is', false);
$journal->description = 'Lorem IPSUM blabla';
$trigger = DescriptionStarts::makeFromStrings('blabla', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}