mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
27 lines
969 B
PHP
27 lines
969 B
PHP
<?php
|
|
|
|
class TimesheetUtilTest extends \PHPUnit_Framework_TestCase {
|
|
|
|
public function testParseEventSummary() {
|
|
list($code, $codes, $title) = TimesheetUtils::parseEventSummary('Riga :)');
|
|
$this->assertSame(null, $code);
|
|
|
|
list($code, $tags, $title) = TimesheetUtils::parseEventSummary('Test:');
|
|
$this->assertSame("TEST", $code);
|
|
|
|
list($code, $tags, $title) = TimesheetUtils::parseEventSummary('Test: ');
|
|
$this->assertSame("TEST", $code);
|
|
|
|
list($code, $tags, $title) = TimesheetUtils::parseEventSummary('Test::');
|
|
$this->assertSame("TEST", $code);
|
|
|
|
list($code, $tags, $title) = TimesheetUtils::parseEventSummary('TEST: Hello :)');
|
|
$this->assertSame("TEST", $code);
|
|
|
|
list($code, $tags, $title) = TimesheetUtils::parseEventSummary('Test/tags: ');
|
|
$this->assertSame('TEST', $code);
|
|
$this->assertSame('tags', $tags);
|
|
}
|
|
|
|
}
|