destination_amount = '12.34'; $trigger = AmountExactly::makeFromStrings('12.340', false); $result = $trigger->triggered($journal); $this->assertTrue($result); } /** * @covers \FireflyIII\TransactionRules\Triggers\AmountExactly::triggered */ public function testTriggeredNotExact() { $journal = new TransactionJournal; $journal->destination_amount = '12.35'; $trigger = AmountExactly::makeFromStrings('12.340', false); $result = $trigger->triggered($journal); $this->assertFalse($result); } /** * @covers \FireflyIII\TransactionRules\Triggers\AmountExactly::willMatchEverything */ public function testWillMatchEverythingNotNull() { $value = 'x'; $result = AmountExactly::willMatchEverything($value); $this->assertFalse($result); } /** * @covers \FireflyIII\TransactionRules\Triggers\AmountExactly::willMatchEverything */ public function testWillMatchEverythingNull() { $value = null; $result = AmountExactly::willMatchEverything($value); $this->assertTrue($result); } }